先用ssh you@remotemachine echo \$PATH查看你的git服务器端安装目录在不在,不在就在
.bashrc加上这一句
PATH=$HOME/_bin/git/bin:$PATH
搞定!
注意,加在.bash_profile 没用。。。这个让我兜了不少圈。
http://tomxu.iteye.com/blog/1630967
ssh@127.0.0.1:server/.git
ssh://ssh@127.0.0.1/users/ssh/server/.git
ssh ssh://ssh@127.0.0.1 echo \$PATH
地址要是git@127.0.0.1:../code/myproject
1、clone时不能用绝对路径,只能写相对于git用户home的相对路径。
2、ssh协议不能写…… : / 不同
http://stackoverflow.com/questions/6167905/git-clone-through-ssh