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