4

How do I remove my credentials from git shell?

I am on a shared computer (Windows) that has remembered my git login details. I have tried closing git shell but when I reopen it I am still logged in (doesn't ask for my details when I do a git operation).

I'd prefer not to restart the computer, as this wouldn't be an option all the time for me.

Hopefully not a repeat of this: http://stackoverflow.com/questions/15381198/remove-credentials-from-git

  • I couldn't find the git-credential-cache daemon under "services" or "processes"
  • There was nothing about the credential helper in ~/.gitconfig
eedrah
  • 2,245
  • 18
  • 32
  • What url are you using? What `git remote -v` returns? Remember a simple git operation like `git log` would never ask you for credentials anyway, so what "git operation" are you doing which should ask you for credentials? – VonC Jan 19 '15 at 06:29
  • `git remote -v` was returning a github url. It was a private github repository I was cloning/pushing/pulling from, so I should have asked for a password for those operations. – eedrah Feb 08 '15 at 02:32

2 Answers2

3

It turns out that the github app was somehow storing the credentials. I managed to log out by going to the GitHub desktop application (installed at the same time as git shell) and logging out from there.

It would be nice to be able to do this from the command line, however.

eedrah
  • 2,245
  • 18
  • 32
0

Go to %appdata% -> Github Folder

you will find a set of cache files that can be deleted. delete them and then run your command again you will be prompted to the enter new credentials.

Note: deleting the cache files could remove other stored passwords too, please be careful