The first step is to run git config -l to see what the current configuration is. If the user.name and/or user.email properties are incorrect, change them using something like this:

git config --global user.name "Mark McFate"
git config --global user.email "yourEMail@address.here"

That’s only half the battle. I love OSX and the Keychain Access app is wonderful, except when I’m working with git and GitHub in a terminal, which I do quite often. The real problem is that I have 4 different identities in GitHub… crazy, I know. Changing from one identity to another has been a real pain-in-the-a$$, up until I found this gem of a post.

Basically, what it tells me to do from the Keychain Access app is this:

  1. In Finder, search for the Keychain Access app.
  2. In Keychain Access, search for github.com.
  3. Find the “internet password” entry for github.com.
  4. Edit or delete the entry accordingly.

Works like a charm! The next git... command I specify, if necessary, will prompt me for my GitHub username and password – or more appropriately, my Personal Access Token, since I now have 2-factor authentication enabled – and those are automatically saved until I repeat the above process. Woot!

And that’s a wrap. Until next time…