git push login failure
git push login failure
When you run git push and see something like this.
remote: Support for password authentication was removed …
fatal: Authentication failed for 'https://github.com/…'
Cause
GitHub blocks pushing with a password. You need a browser login (credential manager) or a token.
Fix
If a browser login window opens
Just log in. Enter your GitHub username and password and click Authorize. After the first time it will not ask again.
If no window opens and the terminal asks for a username and password
Git Credential Manager is missing. The quickest way is to ask the Cursor chat like this.
git push fails with Authentication failed. Install the GitHub CLI (gh),
log in with gh auth login, and then push again.
Follow the AI's instructions and enter the code in the browser.
If you are logged in with a different account
This happens on computers that used a different GitHub account before.
- Windows: open
Credential Managerfrom the Start menu → Windows Credentials → removegit:https://github.com→ push again. - Mac: run the following in the terminal, then push again.
git credential-osxkeychain erase <<EOS
host=github.com
protocol=https
EOS