Dumb question. So I'm "logged in" under one of my GitHub accounts in Git Bash and I need to push to a repo under a different account of mine. Best way to change accounts in Git Bash? Or, for the hell of it, any way I can just give access to my other account? Thanks, much appreciated.
Asked
Active
Viewed 514 times
1
-
Are you on iOS? Most likely it is stored in your OS's keychain, remove it from there and then it will again ask for creds. – Udayraj Deshmukh Mar 14 '18 at 22:44
-
2Possible duplicate of [Multiple github accounts on the same computer?](https://stackoverflow.com/questions/3860112/multiple-github-accounts-on-the-same-computer) – Udayraj Deshmukh Mar 14 '18 at 22:46
1 Answers
0
You can view what account you have using:
git config -l
Then you can change the credentials and push, then change the credentials again.
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
Probably need to see the multiple account question other user listed but this is a quick way to go around it.

Daniel Lara
- 52
- 1
- 7
-
2`user.name`/`user.email` have nothing with authentication. They're only used for commits. – phd Mar 14 '18 at 23:03