Clone git project switched from HTTPS to SSL

Source: Internet
Author: User

There are many kinds of git permissions problems, one of which is because git takes two authentication after the key that requires SSL authorization can have permission Pull,push. Before using Sourcetree to clone project, but the pit is here, accidentally chose the link of https, then pull down the project is HTTPS, and then switch to two times after the authentication of various permissions errors.

So accidentally fan this kind of mistake how to do, delete the item to pull aside again? If you've developed something new, it's inconvenient, here's the solution:


The root directory of the project has a. git file under the terminal to enter the project,

Then open the config file under. git:

Nano. Git/config

You can see the configuration of this project, as below

[Core]        repositoryformatversion = 0        FileMode = true        bare = False        Logallrefupdates = True        ignorecase = True        Precomposeunicode = True[remote "origin"]        URL = https://github.com/xxx/test.git        fetch = +refs/heads/*:refs/ Remotes/origin/*[branch "Develop"]        Remote = origin        merge = Refs/heads/develop[branch "Function_sso_login"]        Remote = origin        merge = Refs/heads/function_sso_login[branch "Fix_crashlytics_bug"]        Remote = origin        merge = Refs/heads/fix_login_bug[branch "Master"]
Replace the link with https in the URL [email protected]:xxx/test.git to

Everything is back to normal.

Clone git project switched from HTTPS to SSL

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.