I’m trying to remove the saved git credentials from my local machine because I need to log in with another account. I tried everything I found, but nothing worked for me. Every time I tried to remove the credentials, I can still successfully push.
I’m currently on a macOS system and logged in with the browser at first, so no personal access token.
I already tried these things:
- removing credentials with git command:
> git credential-osxkeychain erase Press Enter > host=github.com Press Enter > protocol=https Press Enter > Press Enter > Press Enter
- remove everything from the git config except name and email using these commands
git config --global --edit
andgit config --system --edit
and check if everything is removed withgit config --list
- open settings on macOS -> Applications -> Utilities -> Keychain Access and remove GitHub from local and iCloud
- removing the credentials and reboot the system
Nothing worked for me, and I’m a bit frustrated, because it always worked. Does anyone have the same problem or know a fix? Maybe I’m something missing?