我无法克隆一个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

并且存储库存在。


当前回答

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

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

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

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

其他回答

如果你生成新的公共ssh密钥并插入到bitbucket或github和

没用,请重新启动你的电脑。它帮助了我!!

这也许很愚蠢,但它确实发生在我们身上:

如果你正在使用bitbucket和Sourcetree,你只是复制粘贴克隆URL到新的回购对话框,它将显示相同的错误时拉或推。

确保你在URL之前删除了“git clone”的东西。

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

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

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

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

Github(或Bitbucket)在他们的服务器上找不到你的ssh密钥。

只需在您的帐户设置中添加您的密钥。

如果全部失败,就像我的情况一样,卸载GIT,重新安装。出于某种原因,这是固定的。

注:

我尝试生成新的密钥和更新SSH公钥 还尝试删除所有键,并尝试创建一个新键。 没有,我的.gitconfig没有问题