我试图设置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。如果是这样,我不知道如何改变这一点,或者如果我可以推下一个别名


当前回答

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

请参阅此连结

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

其他回答

当我试图将代码从工作默认点推到工作git时,我得到了这个错误。 所以我采取了以下步骤:

去我的个人git账户,用默认设置创建了repo 在终端上,git远程添加origin git@github.com:/.git Git push——set-upstream origin master,确保origin是upstream,下一次提交只能使用Git push进行。

出于某种原因,没有其他方法适合我。希望这有助于使用2个或更多git帐户的人。

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.

我通过重新启动终端解决了这个问题(打开一个新的窗口/选项卡)。

所以如果你真的不想/不需要理解潜在的问题,在深入挖掘之前,测试方法值得一试:)

在我的情况下,它是postBuffer..

git config --global http.postBuffer 524288000

参考阅读:https://gist.github.com/marcusoftnet/1177936

这通常是由于SSH密钥与远程不匹配造成的。

解决方案:

转到终端,输入以下命令(Mac, Linux)替换为您的电子邮件id。 ssh -t rsa -C "you@email.com" 从word ssh开始,使用以下命令复制生成的密钥。 猫~ / . ssh / id_rsa . pub 粘贴在github, bitbucket或gitlab各自的远程。 保存它。