Credential Update After Password Change

Quick note on updating your credentials after you change your password on GitHub.

Steps

Search for “keychain access” in spotlight.

Enter “github” into the search bar. Delete all github password entries.

Clone a repo and make some changes.

cd Desktop

git clone https://github.com/Cdishop/website.git

cd website

echo "some change" >> README.md

Activate keychain.

git credential-osxkeychain

git config --global credential.helper osxkeychain

Trigger a username/password entry by pushing to remote.

git add .

git commit -m "commit for keychain change"

git push -u origin master

[enter credentials]

git push

Route 2 - No Keychain

You may not see a saved password in your keychain. If that’s the case, then you can allow your push to fail and then reset your credentials in the terminal.

Clone, adjust, and then push a repository. After pushing, you will see a “fatal” error.

Enter

git config --global user.email "Your email"

git config --global user.name "Your Name"

Then push again. You will be asked for a username and password. All subsequent repository pushes should then be automatic.

Bo\(^2\)m =)