git Error: remote: Support for password authentication was removed on August 13, 2021.

1. Problem background

When submitting code using git, the following errors are found:

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

It means that user name and password authentication is no longer supported since August 13, 2001, and a personal access token needs to be created

2. Problem solving

① Click the avatar and select settings


② Select developer settings in the left column


③ Select personal access tokens in the column


④ Click generate new token


⑤ Fill in options

If you only use it for yourself, you can directly choose an unlimited validity period

In addition, you can check all the following permissions for convenience, and then click the last generate token to generate a token


⑥ Copy the generated token and save it


⑦ Modify the URL of the existing item (note that when copying this instruction, after changing the Chinese character to the corresponding content, delete the brackets)

git remote set-url origin https://<Your token>@github.com/<your git username>/<repository name to be modified>.git

Similar Posts: