Update GitHub authentication to use a token on macOS (rather than password)

GitHub has disabled password authentication. Below are steps to update the authentication to use a token on macOS.

Get Github personal access token

Got to this url: https://github.com/settings/tokens to generate your access token

Unset existing GitHub login credentials

Run below commands to run on your terminal to unset existing GitHub login credentials (Copy this into your terminal)

Update your Email and Name

Open a new terminal window, and set the name and email for commits.

Update credential with the new token

Run a git push or git clone a private repository so GitHub prompts you to enter your username and password.

For the username, simply enter your email. For the password paste in your token (i.e. copy the token from GitHub website where you created it and paste it in).

If you have any question, don’t hesitate to contact me

Good luck !

Leave a Reply

Your email address will not be published. Required fields are marked *