Message "Support for password authentication was removed."


I got this error on my console when I tried to use git pull:

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see for information on currently recommended modes of authentication.
fatal: Authentication failed for ...

It's very weird, because I just followed the documentation and created a token two weeks ago on GitHub. The token expires on Tue, Oct 26, 2021. Why has this been removed today?


From 2021-08-13, GitHub is no longer accepting account passwords when authenticating Git operations. You need to add a PAT (Personal Access Token) instead, and you can follow the below method to add a PAT on your system.

Create Personal Access Token on GitHub

From your GitHub account, go to SettingsDeveloper SettingsPersonal Access TokenGenerate New Token (Give your password) → Fillup the form → click Generate tokenCopy the generated Token, it will be something like ghp_sFhFsSHhTzMDreGRLjmks4Tzuzgthdvfsrta

Now follow the below method based on your machine:

For Windows OS

Go to Credential Manager from Control PanelWindows Credentials → find git:https://github.comEdit → On Password replace with with your GitHub Personal Access Token → You are Done

If you don’t find git: → Click on Add a generic credential → Internet address will be git: and you need to type in your username and password will be your GitHub Personal Access Token → Click Ok and you are done

For macOS

Click on the Spotlight icon (magnifying glass) on the right side of the menu bar. Type Keychain access then press the Enter key to launch the app → In Keychain Access, search for → Find the internet password entry for → Edit or delete the entry accordingly → You are done

For a Linux-based OS

For Linux, you need to configure the local GIT client with a username and email address,

$ git config --global "your_github_username"
$ git config --global "your_github_email"
$ git config -l

Once GIT is configured, we can begin using it to access GitHub. Example:

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

Now cache the given record in your computer to remembers the token:

$ git config --global credential.helper cache

If needed, anytime you can delete the cache record by:

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

Now try to pull with -v to verify

$ git pull -v

Linux/Debian (Clone as follows):

git clone https://<tokenhere><user>/<repo>.git

For PhpStorm

If you are using PhpStorm, go to menu Gitpull and select authentication via Personal Access Token. Enter your PAT it will allow you to pull/push the changes.

Git: See my last commit

How do I see the commit differences between branches in git?