我无法克隆一个Git存储库,并得到这个错误:

krishna.soni@KRISHNACHANDRAS /c/Projects $ git clone http://stage.abc.com:10088/pqr
http://<url>/<repository> Cloning into '<repository>'... fatal: could not read Username for 'http://<url>': No such file or directory

我读过Bitbucket, Windows和“致命:无法读取密码”,但仍然有问题。

我继续前进,但现在得到这个错误

sh.exe": chown: command not found

krishna.soni@KRISHNACHANDRAS /c
$ git clone ssh://krishna.sonipayu.in@stage.payupaisa.
/projects
Cloning into 'C:/projects'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

> krishna.soni@KRISHNACHANDRAS /c
>     $ git clone ssh:<url>
>     ts
>     Cloning into 'C:/projects'...
>     Permission denied (publickey).
>     fatal: Could not read from remote repository.

Please make sure you have the correct access rights

并且存储库存在。


当前回答

克隆时,我有一个类似的问题[我的错误: 权限被拒绝(公钥)。 无法从远程存储库读取。 请确保您有正确的访问权限。等 ]

我使用的是bitBucket/UBUNTU14.04,但是我已经有了一组我之前生成的密钥文件,并且我已经更改了文件的名称。我简单地将文件复制到标准id_rsa和id_rsa。Pub名称格式。然后我重新运行该命令,没有问题。

OBTW:我也可以通过使用HTTP样式的克隆来使用密码提示。

其他回答

修复hub cli工具:

Git配置—全局中心。协议HTTPS长期 git远程添加OOPS https://github.com/isomorphisms/go.git && git推送OOPS立即修复


此错误发生在hub命令行工具上,因为它们的默认hub错误。协议git-config值。他们设置了回购

git://github.com/schacon/ticgit.git

而不是github实际接受的,即https://github.com/schacon/ticgit.git。


阅读LESS=+/“HTTPS代替”man hub将解释上述“长期修复”命令的来源。

这看起来像是权限问题,而不是Windows 7的问题。

您的ssh密钥未被授权-权限被拒绝(publickey)。

您需要创建一个公共ssh密钥,并请求Git存储库的管理员添加ssh公钥

如何执行此操作的信息:保存ssh密钥失败

解决方案: 在您试图克隆到或从其推送的服务器上 猫~ / . ssh / id_rsa . pub 进入GitHub,设置,SSH和GPG密钥,新的SSH密钥 粘贴键。

如果在创建SSH并将其添加到您的Bitbucket帐户或其他地方后仍然存在访问问题,您需要在git, OSX或Linux上的终端上执行以下操作:

# Lists already added identities (‘ssh keys’)
ssh-add -l

然后,如果你没有看到你的密钥列出,添加它与以下(替换身份为其真实名称):

# Add a new identity
ssh-add ~/.ssh/identity

这对我很管用。

移除远端原点

Git远程删除原点

添加HTTP远程源