Linux git clone error: git-upload-pack: command not found problem with git clone get code on the server [plain] [root @ localhost code] $ git clone root@192.168.57.61: /root/code. git www.2cto.com reports The following error: bash: git-upload-pack: command not foundfatal: The remote end hung up unexpectedly. Why? The original git installation path on the Code server 192.168.57.61 is/usr/local/git, which is not the default path. Follow the prompts to create a link file on the git server 192.168.57.61: www.2cto.com [html] [root @ localhost code] # ln-s/usr/local/git/bin/git-upload-pack/usr/bin/git-upload-pack again, execute git clone.
Of course, if you cannot modify the configuration on the git code server, you can add the -- upload-pack option during clone to specify the git-upload-pack path on the git server, achieve the same purpose as above, as shown below: [html] [root @ localhost code] $ git clone -- upload-pack "/usr/local/git/bin/git-upload-pack" root@192.168.57.61:/root/code. of course, you may encounter errors such as git-receive-pack, which may be the same as this principle. Please use similar operations! Author love _ coder