Changing Github Credentials on Mac OS
Lately, I have been having a heck of a time changing my Github credentials on Mac OS. Everything I would try wouldn’t “stick” or would somehow get reverted – even when I would manually delete my credential from Keychain Access. I needed to do this as I want to make commits to Github under my other username/account.

Keychain Access
Here Are Things that Didn’t Work
- Using the Git command line to change my username
- Using the Github desktop UI to change my username
- Deleting my Github entry in Keychain Access manually
The Right Way to Change Your Credentials to Github in Keychain Access
Open up a command line and enter:
git credential-osxkeychain erase host=github.com protocol=https [Press Return]
This will result in your Github entry being removed from the Keychain Access. Then next time you attempt to clone, push, pull, etc. from a Github repo you should be prompted for your username and password. You will also need to do this if you change your Github password.
Hope this helps save someone some time!
Also, see visit some of our other posts on using Mac OS for data science!