ProjectStack
git

fatal: Authentication failed

Git couldn't authenticate with the remote server. Either your credentials are wrong, expired, or the authentication method you're using is no longer accepted.

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

  1. Generate a new Personal Access Token on GitHub: Settings → Developer settings → Personal access tokens
  2. Use the token as your password when prompted, not your account password
  3. Clear cached credentials: git credential reject (then re-enter when prompted)
  4. 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.