When I try to pull from git repo, I got below exception
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
Solution:
Step1: My Account → Settings → Developer settings → Personal access tokens → Click on Generate new token.
Step2: In windows, update the password in Credentials Manager
Open Control Panel → User Accounts → Manage your credentials → Windows Credentials.
As shown in below, click of github.com and update the password with token
Mac Users:
- Search for App in your Mac -> Keychain Access.
- Search for github.com and click on show password, then enter your Mac’s password and hit Enter.
- Now copy the token and Save changes.
Update Origin
For existing local repositories, update the origin with token instead of all above steps
git remote set-url origin https://<token>@github.com/<username>/<repo>.git