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