当前位置: 首页 > 工具软件 > Bash-Git > 使用案例 >

bash: git-upload-pack: command not found

陆文斌
2023-12-01

报错如下:

bash: git-upload-pack: command not found
fatal: Could not read from remote repository.

 

原因:代码服务器git安装路径是/usr/local/git,不是默认路径,根据提示,在git服务器上, 建立链接文件:

# ln -s /usr/local/git/bin/git-upload-pack /usr/bin/git-upload-pack 

你发现再次 git clone 时

报错如下:

bash: git-receive-pack: command not found
fatal: Could not read from remote repository.

# ln -s /usr/local/git/bin/git-receive-pack /usr/bin/git-receive-pack

再次执行 git clone 成功!

 类似资料: