centos编译安装git后,clone出现git-upload-pack: command not found

转载

原文地址:http://blog.csdn.net/fffy2366/article/details/41284907

git clone  git@192.168.60.62:/opt/www/test/test.git

 

报错:

git-upload-pack: command not found 。。

 

解决:

ssh you@remotemachine echo \$PATH
查看是否有 /usr/bin
git安装到/opt/git 下了,所以两种解决办法:
1.git clone --upload-pack "/opt/git/bin/git-upload-pack" git@192.168.60.62:/opt/www/liuwantest/test.git
2.
ln -s /opt/git/bin/git-upload-pack /usr/bin/git-upload-pack


ln -s /opt/git/bin/git-receive-pack /usr/bin/git-receive-pack
posted @ 2017-09-21 18:04  远洪  阅读(1211)  评论(0)    收藏  举报