报错前提:使用git上传文件至远程服务器上的git
报错内容如下:
bash: git-receive-pack: command not found(找不到命令)
fatal: Could not read from remote repository.(致命:无法从远程存储库中读取。)
Please make sure you have the correct access rights(请确保您拥有正确的访问权限)
and the repository exists.(存储库存在。)
原因:远程服务器上的git安装路径是/usr/local/common/git,不是默认路径,所以
建立链接文件:
[root@dimain ~]# ln -s /usr/local/common/git/bin/git-receive-pack /usr/bin/git-receive-pack
回车即可