In Linux git clone, the following error occurs: git-upload-pack: command not found.

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.