Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Please use a personal access token instead. (But using one)

Username for 'https://github.com': username
Password for 'https://[email protected]': 
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: Authentication failed for 'https://github.com/username/repo.git/'

I'm still receiving this error despite using personal access token, and it has been working fine for about 6 months, it has no expiration date.

But now I'm trying to pull some changes on my vps and this error appears.

I've created a new access token but still getting the same error.

How can I solve this?

like image 924
abendevs Avatar asked Sep 17 '25 02:09

abendevs


1 Answers

Solve the problem by setting origin url before push or pull something, just like this:

~$ git remote set-url origin https://<githubtoken>@github.com/<username>/<repositoryname>.git

~$ git pull origin <branch>

As it says here “Support for password authentication removed” for GitHub. How to Generate Personal Access Token?

like image 159
abendevs Avatar answered Sep 18 '25 19:09

abendevs