我已经在我自己的私有(private) Ubuntu 服务器上安装了 gitosis。它似乎在本地工作得很好,但是每当我尝试从与服务器通信的另一台机器运行命令时,我都会收到“命令未找到”错误。
例如,这有效:
e:\src> git --version
git version 1.7.3.1.msysgit.0
但是,这不会:
e:\SRC\www\listings>git clone git@server:listings
Cloning into listings...
bash: git@server: command not found
fatal: The remote end hung up unexpectedly
与服务器通信的任何其他命令(push、pull、ls-remote 等)的结果相同。
我对 git、gitosis 和 ubuntu 还比较陌生(如果它没有显示:)),所以我正在努力弄清楚如何诊断这个问题。有什么建议吗?
最佳答案
git@server
默认使用 ssh 协议(protocol);您是否在远程计算机上设置了 git 用户,并且设置了 ssh key ?
而且,应该是
listings.git
这会对您有所帮助:http://progit.org/book/ch4-0.html
关于git bash : git@server: command not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4630601/