Ad

Friday, November 26, 2021

Setting up Github developer access tokens | Debugging git push not working requires | How to get Github Access Token

Access token is now required for Github repo git push as of August 13, 2021.  This post solves git push does not work due to authentication errors. After August 13, 2021, Github requires access tokens instead of password login. This post covers how to get github access token for your own developer account. It solves when using receiving "remote: Support for password authentication was removed on August 13, 2021." error message after using git push

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.

See the screenshot below to go to setting > developer setting > personal access tokens to generate your access token. For max security select a recent expiration date.


You will also select the appropriate permissions, for example will need to select the repos permission to make git push work. 

https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

Github log in with token

Now that you generated the developer token (which you have to do whenever the previous expires), you will need to log in with the token. authenticate github using access token

Now you will need to remove the old credentials. Warning: this is tricky, you might be logged out, and lose progress, so please do your own research, and only use these commands if you know what you are doing. Read more on the github documentation below. 
git credential-osxkeychain erase
host=github.com
protocol=https


When using a command that requires access token, such as git push, you will be asked to authenticate. Enter your username like you normally would, instead of password, use access token for the second part. If you lose it, you can repeat the earlier step and generate a new one. Delete the old one that you no longer need.

No comments:

Post a Comment

React UI, UI UX, Reactstrap React Bootstrap

React UI MATERIAL  Install yarn add @material-ui/icons Reactstrap FORMS. Controlled Forms. Uncontrolled Forms.  Columns, grid