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

The error “remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.” is an error that is invoked whenever you are trying to make a git pull request. Given below is the snippet of the error which you can find:

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 "..." : The requested URL returned error: 403

I would like to share with you the steps I took to fix the “remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.” in your git file.

Why “remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.” Error is seen?

The error, “remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.” is seen because; since August 13, 2021, GitHub team has stopped accepting account passwords to authenticate Git operations. You will have to add a PAT or Personal Access Token instead of user account passwords.

The detailed solution to fix the error “remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.”, is given below.

How to fix the error, “remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.”?

A simple fix to the error, is to add a PAT or Personal Access Token instead of user account passwords. You will have to add a PAT depending on what operating system you are using.

To fix the error, “remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.”, follow the method which is given below depending on the operating system in your machine.

First, follow the step to Create Personal Access Token on GitHub, regardless of the operating system you are using

Create Personal Access Token on GitHub

From your GitHub account, first you will have to go to your  Settings -> Developer Settings -> Personal Access Token -> Generate New Token (Give your password) -> Fillup the form -> click Generate token -> Copy the generated Token, it will give you something like this ghp_sFhFsSHhTzMDreGRLjmks4Tzuzgthdvfsrta

Now you will have to follow the below-given method depending on the operating system you are using:

For Windows OS: 

First you will have to go to Credential Manager from  your Control Panel -> Windows Credentials -> then search for git:https://github.com -> Edit -> On the password section, replace it with your  GitHub Personal Access Token -> then you are Done

In case you cannot search for git:https://github.com => Go to Add a generic credential -> The internet address would be git:https://github.com then you would need to type in your username and password and this will be your GitHub Personal Access Token -> Press Ok and then you are done.

For MacOS: 

You will have to click on the Spotlight icon on the right side of your menu bar. Then you will have to type in  Keychain access then search using the Enter key to launch your app -> Inside your Keychain Access application, search github.com -> Then you will have to find the internet password entry for github.com => You can edit or remove the entry accordingly -> Then You are done

For Linux-based OS:

For Linux-based operating systems, you will have to configure the local GIT client with a particular username and email address, using the below given code.

$ git config --global user.name "your_github_username"
$ git config --global user.email "your_github_email"
$ git config -l

Once GIT is configured, you can use it to access GitHub. For Example:

$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
> Cloning into `YOUR-REPOSITORY`...
Username: <type your username>
Password: <type your password or personal access token (GitHub)

Now you will have to cache the given record in your computer so that it remembers the token, with the help of the following code given below.

$ git config --global credential.helper cache

In case anytime you wish to delete the record you can delete the cache record by, following the below-given command.

$ git config --global --unset credential.helper
$ git config --system --unset credential.helper

Now you can try to pull with -v to verify the results.

$ git pull -v

For Linux/Debian (Clone as follows):

git clone https://<tokenhere>@github.com/<user>/<repo>.git

For PhpStorm:

If you are using PhpStorm, you will have to go to menu Git -> pull and select authentication via Personal Access Token. Then you will have to enter your PAT and then it will allow you to pull/push the changes.

Conclusion

To fix the error “remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.”, add a PAT or Personal Access Token instead of user account passwords.

You will have to add a PAT depending on what operating system you are using. You will have to first create a PAT on github website and then follow the given procedures to edit your PAT on github app in your given operating system