Solve git clone over HTTPS 401 Error

Source: Internet
Author: User

The system prompts the following error when using git clone http: // 10.0.13.2/Project:


The requested URL returned error: 401 (curl_result = 22, http_code = 401 ....)
From http_code = 401, we can see that it is due to authorization. Although username and password have been prompted, the username and password previously entered are not saved for multiple requests.
Solution 2:
1. Create the _ netrc file under $ home and write the following content in it:
Machine 10.0.13.2
Login your_username
Password your_password
2. Provide the username and password directly when executing the command, as shown below:
Replace git clone http: // 10.0.13.2/project
Git clone http: // username: password@10.0.13.2/Project

 

References:
Http://stackoverflow.com/questions/5796171/git-clone-over-https-401-error-and-not-asking-for-username-or-password
Http://stackoverflow.com/questions/4980912/username-and-password-in-https-url

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.