I am trying to set the personal access token in VS code, but it doesn't seem to accept it. I put it in the "Github: Set Personal Access Token" in the command palette but it doesn't seem to have any effect. I also put the token in the Windows Credentials manager.
When I try to push, I get this error:
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://<usr>:[email protected]/<us>/repository.git/': The requested URL returned error: 403
Make sure you have the latest Git for Windows, and the git config --global credential.helper set to manager-core.
From there, check you do have indeed the token as password stored in the credential helper, using a CMD (not git bash):
printf "protocol=https\nhost=github.com"|"C:\Program Files\Git\mingw64\libexec\git-core\git-credential-manager-core.exe" get
protocol=https
host=github.com
username=VonC
password=ghp_Dxc...<yourToken>
Make sure that token starts with ghp_ (following the new token format update).
If not, remove it:
printf "protocol=https\nhost=github.com"|"C:\Program Files\Git\mingw64\libexec\git-core\git-credential-manager-core.exe" earase
Then the next push will ask and store your new credentials.
No need to manually tweak the Windows Credential Manager: that is what those helpers are for.
From the discussion, the problem was twofold:
Solving those two issues allowed VSCode to start pushing with the proper credentials.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With