Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove saved credentials from TortoiseGit

My credentials are saved in TortoiseGit (using Wincred) but my password changed.
The only way for me to pull from the repository now is to remove the Credential Helper.

How can I simply change the password?
Alternately, can I remove my credentials and save my new ones?

like image 369
Gidil Avatar asked Aug 03 '15 07:08

Gidil


People also ask

How do I clear my cached credentials in git?

You could also disable the use of the Git credential cache using git config --global --unset credential. helper. Then reset this, and you would continue to have the cached credentials available for other repositories (if any). You may also need to do git config --system --unset credential.

How do I change my TortoiseGit account?

Right-click anywhere in Explorer and choose TortoiseGit → Settings. In the Settings dialog, choose Git. Type in your username and email and click Apply. These settings are written to the global gitconfig file for this user.

How do I remove old credentials from git Mac?

Just go to Applications -> Utilties -> Keychain Access, then enter "github.com". You can either delete the invalid item or update the password from with the app.

Where is git credentials file stored?

It is located at %UserProfile%\. git-credentials , which corresponds to C:\Users\<username>\. git-credentials (unless you've modified the registry to move your user's profile directory elsewhere).


2 Answers

Normally the invalid credentials should be purged automatically (after one unsuccessful authentication attempt).

Go to the Windows Credential Manager (press Windows and type "Credential Manager", or go to Control Panel\User Accounts and Family Safety\Credential Manager or use Start->Run rundll32.exe keymgr.dll,KRShowKeyMgr), there all saved credentials should be listed (prefixed with git:).

For ways to also remove saved credentials on other OS, see https://stackoverflow.com/a/39944557/3906760.

like image 59
MrTux Avatar answered Sep 18 '22 12:09

MrTux


I changed my Windows password and now GIT would fail with authentication error, and even doing 2 pull in a row with git pull -v would not prompt for the new password.

It was really hard to find the Windows credential manager since not only do I have Windows 10, but also it's a French language version.

I finally found on this page I could access it by using:

rundll32.exe keymgr.dll,KRShowKeyMgr 

and I double-clicked on the git:http: line to enter the right password and I was then able to pull and push to the repository.

I hope this helps someone else.

I'd still like to understand why it's not asking me for the new password anymore - it used to ask for it the first 2 months after I got my Windows 10 PC (I change password every month)

like image 29
Stephane Desmarais Avatar answered Sep 21 '22 12:09

Stephane Desmarais