Home > Enterprise >  Update personal token for github
Update personal token for github

Time:12-21

My personal access token has expired for GitHub, I really can't work figure out how to update the personal access token on the command line.

git push
Password for 'https://[email protected]': 
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.
fatal: Authentication failed for 'https://github.com/myuser/myrepor.git/'

Any help would be appreciated as I am very confused

CodePudding user response:

You should not save the token in the URL. That's insecure, because anybody who can read the configuration file can see your credentials. The Git FAQ explains how to set up and use a credential helper.

To remove the token from your URL, do this:

$ git remote set-url origin https://github.com/myuser/myrepor.git

Then, after setting up your credential helper, when you push, Git will prompt you for your credentials. Enter your username when prompted, and provide the token when prompted for the password.

  • Related