After switching windows git git push remote repository address prompt Authentication failed

Remote switching branch git:

method one:

Remote git the SET -url Origin your new remote warehouse address

Method Two:

Remote RM Origin git 
git the Add Remote Origin of your new remote warehouse address

If you do not worry whether the change is successful, you can view the config file .git file in the current folder path in the url whether to change or git remote -v view the origin to the address is correct.

Method three:

Modify the config file directly under .git.

But because I did not notice, set up a remote repository registered after the completion of the username is not the original user name, push the time suggested that the total Authentication failed error.

Open windows computer settings

 

Search windows credentials, or go to "Control Panel" - "User Accounts" - Credential Manager --windows credentials, find the username and password git, modification right after it.

 

 

Guess you like

Origin www.cnblogs.com/cyj7/p/11727814.html