Common causes
- GitHub removed password authentication — you need a Personal Access Token (PAT) instead
- Your PAT has expired or been revoked
- The username or token in your credential helper is stale
- You're pushing to a repo you don't have write access to
How to fix it
- Generate a new Personal Access Token on GitHub: Settings → Developer settings → Personal access tokens
- Use the token as your password when prompted, not your account password
- Clear cached credentials: git credential reject (then re-enter when prompted)
- On Mac, clear Keychain: git credential-osxkeychain erase, then provide host and protocol
Example
remote: Support for password authentication was removed on August 13, 2021.
fatal: Authentication failed for 'https://github.com/user/repo.git/'Pushing to GitHub using a username/password after PAT enforcement
Have a different error?
Paste any error message into the Error Translator to get an instant explanation.
