Recently, I got this message when have tried to push the commit to the Github repository of my blog:
roman@Romans-MacBook blog % git push origin head --force
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/blog.git/': The requested URL returned error: 403
To fix this issue I have followed the official Github guide about personal token creation.
Then I have searched for local Github keys. You need to open “Keychain Access” on MacOS and search by “github” keyword:
You need to delete all keys:
Then go to the project and try to git push origin head
:
Click “Open” and authorize the Visual Studio Code. Click the “Continue” button:
Authorize Github for VSCode by clicking on the “Authorize Github” button:
In the browser modal, click on “Open Visual Studio Code”:
Now you can go with a git push origin head
again: