我试图设置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/config文件中

[remote "YOUR_APP_NAME"]
    url = git@heroku.com:YOUR_APP_NAME.git
    fetch = +refs/heads/*:refs/remotes/YOUR_APP_NAME/*

并简单地

git push YOUR_APP_NAME master:master 

Git需要使用HTTPS:

在终端中输入:

$ git remote set-url origin abc@***.com:path/to/httpURLRepo

然后提交:

$ git add .
$ git commit -m "This is the commit message"

git branch——set-upstream-to=origin/(分支名)

我也有同样的问题。

此错误意味着您没有指定代码将在其上进行推送的远程URL位置。

远程URL设置主要有2种方式:

通过在Git Bash上执行命令指定远程URL。 导航到项目目录 打开Git Bash 执行命令: git remote set-url origin <https://abc.xyz/USERNAME/REPOSITORY.git> 在配置文件中直接提到远程URL 导航到项目目录 移动到。git文件夹 在文本编辑器中打开配置文件 复制并粘贴以下行 (远程“起源”) url = https://abc.xyz/USERNAME/REPOSITORY.git Fetch = +refs/heads/*:refs/remotes/origin/*

欲了解更多详细信息,请访问此链接。