我试图设置git与http://danielmiessler.com/study/git/#website来管理我的网站。

我已经到了指令的最后一步:git push website +master:refs/heads/master

我正在win7中使用git ming32命令行工作

$ git push website +master:refs/heads/master
Bill@***.com's password:
Connection closed by 198.91.80.3
fatal: Could not read from remote repository.

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

这里的一个问题可能是程序正在寻找bill@* **.com。当我通过ssh连接到我的网站,我有一个不同的用户名(让我们说'abc')。也许这个应该是abc@***。com。如果是这样,我不知道如何改变这一点,或者如果我可以推下一个别名


当前回答

不是OP的问题,但如果你在一个GitHub组织/团队中工作,你可能没有对存储库的写权限。不幸的是,git没有显示更具体的权限错误。在我的例子中,我正在使用一个私有存储库,并被授予了“Triage”或“Read”访问权限。

有关每个权限级别的存储库访问的更多信息,请参阅GitHub文档。

在GitHub上更改这一点的链接是https://github.com/orgs/ORGANISATION_NAME/teams/TEAM_NAME/repositories,在那里您可以更改给予团队的权限。

其他回答

I would recommend to check all remotes you have configured with git remote -v If you had your repo configured to a remote that was deleted you will receive this error message: fatal: Could not read from remote repository. Please make sure you have the correct access rightsand the repository exists. Even when trying to push or pull to an other (existing) remote. So if you have a remote that was deleted, you can remove with git remote remove name-of-remote-to-remove and after that you can push or pull to your existing remotes without problems.

我之前也遇到过同样的问题…

我的.git/config有

url = git@github.com:manishnakar/polymer-demo.git

我把它换成了

url = https://github.com/manishnakar/polymer-demo.git 

现在它工作了:)

我也遇到了同样的问题,通过更新到最新的git版本解决了这个问题

我有一个完美的工作git,突然我得到了一个错误,当我试图推到master。我发现,这是因为存储库主机有问题。

如果你使用GitHub或Bitbucket,你可以很容易地检查状态

https://status.github.com/messages或https://status.bitbucket.org/

在做了一些研究之后,我终于找到了解决方案,你已经声明了一个环境变量到plink.exe路径。因此,如果您删除了该路径,重新打开git bash并尝试通过SSH克隆它,它将工作。

请参阅此连结

http://sourceforge.net/p/forge/site-support/2959/#204c