August 13, github requested URL 403

Today I got the following errors when accessing the github

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/XXX/XXX.git/': The requested URL returned error: 403

My solution is firstly apply the personal token, and then using the following command to clone the repo, then it works.

git clone https://<TOKEN>@github.com/<user_name>/<repo_name>.git

Or you can

git remote set-url origin https://<TOKEN>@github.com/<user_name>/<repo_name>.git

Then everything works.

--

--