Reprint-------Delete or modify the account password saved by the local Git

Today, I encountered the problem of needing to change the password of the git account. After finding the solution, I saved it and I can find it directly next time.

 

 

Application scenario: I have two Github accounts. At first, I used the one registered with the school account, and the password was also remembered by the local computer. Later, I wanted to change to the account registered with gmail, but username and useremail are both easy to use. Change it, but the password has not been changed for a long time.

Later, I found the answer on the CSDN blog, not only found a way to modify the Github password, but also the method of modifying other accounts recorded locally; the summary is as follows:

Method 1: Do it through the control panel

  1. Open the Control Panel;
  2. Find User Accounts;
  3. Select Manage Windows Credentials;
  4. Find git below: https://github.com, open the edit and save it.

The path to modify the panel is: Control Panel\User Accounts\Credential Manager; there may be slight differences due to different versions of the operating system.

Method 2: Do it by modifying the config file

You can clear the contents of the C:\Users\Alvin\.git-credentials file, and then save it. If the saving fails, use administrator privileges; after clearing, try pushing, and you should be prompted to enter username and password.

If it does not take effect, you can also clear the contents of the C:\Users\Alvin\.gitconfig file, save it and try the push operation.

If that doesn't work, use method 1.

 

 

Original blog post address: http://alvinwp.com/common-sense/1887

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325122555&siteId=291194637