-2

Ok I'm aware this sounds stupid and I'm actually stunned this is such a problem, I changed my account under linux before but in Windows it somehow doesn't work at all.

All I want is to use another account. I tried setting new account name etc.

git config --global ***

However, while it display the right name, when I try to push it still uses my old account.

I cant believe this is so hard and wasted already way too much time on it, could someone please enlighten me (I'd prefer using bash but whatever gets the job done is good).

And for some reason google only gives me crap on this...

meow
  • 2,062
  • 2
  • 17
  • 27
  • Could you add some examples of what commands you're running which will cause it to push using your old account? – alexmuller Sep 20 '17 at 15:03
  • Pretty much everything on the first two pages when you enter "change Github accounts". Nothing works, I'm giving up on this, not worth the time, I'll just reinstall. – meow Sep 20 '17 at 17:16
  • Possible duplicate of [Remove credentials from Git](https://stackoverflow.com/questions/15381198/remove-credentials-from-git) – meow Sep 23 '17 at 09:08

3 Answers3

0

git config --global -e for editing the config.

As specified by the command line: -e, --edit open an editor

This only changes the display name. To change accounts, switch your SSH key identity or HTTP credentials.

Kieran Devlin
  • 1,373
  • 1
  • 12
  • 28
  • The question is WHAT DOES WORK, not why nothing described on the web seems to be working, but thanks anyways. – meow Sep 20 '17 at 17:27
  • I just did. Change your SSH key or HTTP credentials. https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ https://help.github.com/articles/caching-your-github-password-in-git/ That is the way you change your account. Either you're doing it wrong or you're explaining your issue incorrectly. – Kieran Devlin Sep 21 '17 at 10:30
  • Hm I tried all of those commands to be honest. The only thing that helped was the Credential Manager. – meow Sep 21 '17 at 20:54
0

all you're doing is setting your display name

Try this

git config credential.https://github.com.username yourusername

More info on the git documentation

Robbie Milejczak
  • 5,664
  • 3
  • 32
  • 65
0

Ok finally found an answer:

  1. Go to Credential Manager

  2. Go to Windows Credentials

  3. Delete the entries under Generic Credentials

As described in this post:

Remove credentials from Git

meow
  • 2,062
  • 2
  • 17
  • 27