3

I accidentally entered the credentials form an old github account the first time VSCode tried to connect when synchronizing my changes (the credentials were right for the old account, but i would like to use the new account).

Now I cannot find a way to change my account. Already tried uninstall/install, but VSCode keeps remeberming my login.

Any ideas how to refresh the given account?

Skilla123
  • 81
  • 1
  • 1
  • 7

1 Answers1

2
git config --global --unset credential.helper

this will unset the git credentials for your system, Now you can use your new credentials and then enable the cache for git

git config --global credential.helper wincred
git config --system credential.helper wincred

this will again enable the cache for saving git password

Lalit Sachdeva
  • 6,469
  • 2
  • 19
  • 25
  • 1
    thank you for your answer! this does not seem to work for me :/ also if i do `git credential-manager` i get `usage: git credential-manager [approve|clear|delete|deploy|erase|fill|get|install|reject|remove|store|uninstall|version] [] fatal: Unable to open help documentation` – Skilla123 Jun 17 '17 at 13:15
  • Try this on git bash and use the full commands mentioned above. I tried this on my system and working like a charm. – Lalit Sachdeva Jun 18 '17 at 04:38
  • 1
    What worked for me on windows 10 is go Control Panel > Use Account > Credential Manager > Windows Credentials Then remove existing credentials for github.com , then when you try to do git push in VSCode , it should prompt for github login , then use correct login. So changing the github connections actual lies outside of VSCode. – Shrikant Prabhu Oct 23 '20 at 07:09