How do I sign out from a certain account on git through the command line?
I have two accounts and I don't know how I ended up with the wrong one. And after trying different approaches, I can't seem to find a way to sign out from there.
When I push, I get:
remote: Permission to yyyyyyyy/xxxxxx.git denied to ZZZZ. //<---- wrong acc fatal: unable to access 'https://github.com/yyyyyyyy/xxxxxx.git/': The requested URL returned error: 403 I've tried:
git config --global --unset-all git config --global --unset user.name git config --global --unset user.email git config --global --unset credential.helper git remote rm origin git remote add origin [email protected]:<username>/<repo>.git git push --set-upstream origin <my-branch> rm ~/.gitconfig But I always get the same error.
Thanks!
git fetchorgit push(or a command that runs those), Git calls up some other Git over the Internet-phone, using a URL. The URL can start withhttps://(to use HTTPS) or withssh://(to use SSH). If using HTTPS, as you are here, Git will use a credential helper to obtain the credentials (user name and password). The credential helper is OS-specific, so mention your OS and Git version.credential-osxkeychainas described on github here.