Error message when using git push
:
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/codingTheWorld777/react-mini-projects.git/': The requested URL returned error: 403"***
I cannot use my token to access GitHub, so how can I push code to GitHub?
How to fix remote: Support for password authentication was removed? Since we cannot use account passwords when authenticating git operations, we can fix this issue by generating the PAT(Personal Access Token) in GitHub and using the PAT as authentication for Git operations.
Github has removed the support for Password Authentication from August 13, 2021. The password authentication support has been eliminated because it is easy for people to crack the passwords. A personal access token can reduce the damage. Now GitHub will not allow if you try to use git by username and password.
GitHub announced their intent to require the use of token-based authentication for all authenticated Git operations. They will no longer accept account passwords when authenticating Git operations on GitHub.com:
Generate token:
On Mac:
On Windows:
Go to Control Panel → User Accounts → Credential Manager
Edit the Generic Credential of GitHub
Paste the token instead of the password
You need to change the remote URL with:
git remote set-url <stream> https://<token>@github.com/<username>/<repo>
token
can be found here.
I also encounter this problem today, on macOS.
I solve this problem by:
First, get a token! Follow the guidance of GitHub. I think you can just click the link provided in the warning.
Second, change the key chain on macOS:
Then, my problem is solved and I can "git push" now.
Step 1: Go to your GitHub account → Settings → Developer settings → Personal access tokens → Generate / regenerate your token
Step 2: Go to https://cli.github.com and download GitHub CLI
Step 3: Go to your command line or Terminal → gh auth login and follow with login credentials. Done.
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