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
2
  • 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? Commented Jan 19, 2015 at 6: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. Commented Feb 8, 2015 at 2:32

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.