Token Authentication Requirement for Git Operations

Today is August 14, 2021.

I was working on a very important long-term project and I used the command git add . to add my commits. But when I enter the command git push it gives me the following error:

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: unable to access 'https://github.com/jeet-khondker/repository-name.git/': The requested URL returned error: 403

Basically I am using VSCode to execute my Git operations.

So when I look over to the blog mentioned in the error message, I found that I need to use token authentication for Git operations instead of password authentication.

I am kind of afraid how to overcome this issue as because this is a very important project I am working on and I don’t want to loose any of my previous code commits.

May I have your kind support of how to overcome this issue and switch from password authentication to token authentication without disrupting my codebase?

Thank you.

You need to create Create a PAT as described in the blog post, and use that instead of your password for pushing (or other authenticated Git operations). If the password is cached somewhere, you might need to delete that.

The PAT should probably have the repo and workflow scopes. The first gives access to all your repositories, the second lets you modify GitHub Actions workflows.

1 Like

Hi Luna,

Thank you for your response to my problem. I finally solved my issue.

Thanking you once again.

As best I can understand the PAT installation process described, I’ve followed the same process on two different linux systems. On one, everything works as expected. On the other, I am blocked from using https operations.

Output from git config --list is exactly the same on both systems for user.name, user.email and user.password. There are some other differences between the two git config listings, but as far as I understand it, user.name and user.password are the only relevant ones.

As airtower writes, it may be a caching issue. But I have no idea how to clear the cache.

Are there other git config settings I’ve missed? Why else might one system work and not the other?

I appreciate any specific steps to take to diagnose or resolve the problem. Thanks.

1 Like

I am using Mac OS, and I successfully solved my issue using Keychain Access.