git 通过 ssh,推送不起作用
我通过 ssh 克隆了一个 git 存储库。经过一番工作后,现在可以了。
git clone "ssh://[email protected]/repo.git"
但现在,当我尝试推送到服务器(这是我的)时,
git push origin master
我收到错误:
git: '/repo.git' is not a git command. See 'git --help'.
fatal: The Remote endhanged Outstanding
存储库安装在带有 COPSSH 和 msysgit 的 Windows 上。 有什么想法吗?谢谢你!
Possible Duplicate:
GIT: clone works, remote push doesn’t. Remote repository over copssh
I cloned a git repo over ssh. After some work it now worked.
git clone "ssh://[email protected]/repo.git"
But now, when I try to push to the server (which is mine)
git push origin master
I get the error:
git: '/repo.git' is not a git command. See 'git --help'.
fatal: The remote end hung up unexpectedly
The repo is installed on windows with COPSSH and msysgit.
Any ideas? Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
打开 .git/config 文件并查看
[remote "origin"]
下的 url 设置了什么。如果不是正确的网址,请将其指向ssh://[email] ;受保护]/repo.git
。从错误消息来看,url 似乎没有正确设置。Open
.git/config
file and see what is set for url under[remote "origin"]
. If it is not the correct url, point it to thessh://[email protected]/repo.git
. From the error message, it looks like the url is not setup properly.解决了。
必须更改配置文件:
如下所示:
GIT:克隆有效,远程推送无效't。通过 copssh 的远程存储库
现在它就像一个魅力!
Solved it.
One has to change the config file:
As written here:
GIT: clone works, remote push doesn't. Remote repository over copssh
Now it works like a charme!