我无法克隆一个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后, 我推到原点开始工作。

其他回答

我在linux上也遇到了类似的问题。我通过登录到github服务器并创建一个部署密钥来解决这个问题。这是存储库的设置。然后,复制并粘贴我的公钥(通常在~/.ssh/id_rsa中)。Pub,但您的配置可能不同)。有一个复选框给予该密钥写权限。单击它(除非您只使用git进行部署,在这种情况下,不要单击它)。

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

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

您需要执行ssh-keygen -t rsa命令创建新的ssh密钥。

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

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

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

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

我看到这个错误信息有很多不同的原因。 当我试图在本地设置另一个存储库时,除了一个已经完全使用ssh等,并将其连接到同一服务器,但其他存储库时,我也犯了同样的错误。这里找不到答案,但我想出来了。所以我发布了它。希望能帮到别人。

git remote add origin git@git.ourserver.com:teamalpha/repositorytwo.git