Error uploading code to github using Msysgit

Source: Internet
Author: User

I tried it today. Clone a remote repository on GitHub locally, then modify, add, commit to local, everything goes well, and finally the following error occurs when using Git to push the origin Master command:

could not read username for ' https://github.com '

Check the Internet, this is Msysgit 1.8.5 version of a bug, embarrassed. The reason for this is that I used the HTTPS protocol instead of the GIT protocol when I was cloning.

Workaround One: Directly modify the config file in the. git directory and change the URL to the URL of the GIT protocol

Solution Two: First remove Origin from the local, and then re-add, two lines of code are as follows:

Git remote RM origin git remote add origin [email protected]:username/repository.git


Error uploading code to github using Msysgit

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.