Git "Password authentication is no longer supported" in CI
GitHub removed account-password authentication for Git over HTTPS. A pipeline still passing a password is rejected outright and must use a token instead.
What this error means
A clone or push over HTTPS fails with remote: Support for password authentication was removed. The same operation works once a token replaces the password.
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/org/repo.git/'Common causes
Account password used for HTTPS Git
A legacy script or stored credential still sends the GitHub account password, which is no longer accepted.
Cached old credentials
A credential helper cached a password that is now invalid.
How to fix it
Authenticate with a token
- Replace the password with a PAT, GitHub App token, or the Actions GITHUB_TOKEN.
- Use x-access-token as the username.
git remote set-url origin https://x-access-token:${{ secrets.GH_PAT }}@github.com/org/repo.gitClear stale cached credentials
- Reset the credential helper so the old password is not reused.
git config --global --unset credential.helper || trueHow to prevent it
- Switch all HTTPS Git auth to tokens (PAT, App, or the workflow GITHUB_TOKEN), and never store an account password in CI.