GitHub has disabled password authentication. Below are steps to update the authentication to use a token on macOS.
Table of Contents
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)
1 2 3 4 |
git config --global --unset credential.helper git credential-osxkeychain erase host=github.com protocol=https |
Update your Email and Name
Open a new terminal window, and set the name and email for commits.
1 2 |
git config --global user.name "Your Name" git config --global user.email you@example.com |
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 !
I am a Freelancer in programming specifically Python Scripting, Web scraping, and Web automation with 10+ years of experience.