GitHub Actions "could not read Username" (token not passed to git)
By Kaveh Alemi·Latchkey
A git command tried to authenticate interactively because no token was configured. In CI there is no prompt, so it fails. This is a setup issue, not transient.
What this error means
A git fetch, clone, or push fails with "could not read Username for https://github.com: terminal prompts disabled".
github-actions
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Common causes
No credentials configured
Cloning a private repo or pushing without a token means git has no way to authenticate.
Manual git after checkout cleared credentials
Re-cloning a different repo, or disabling persist-credentials, removes the auth header.
How to fix it
Supply a token to git
Pass a token to actions/checkout, or set an extraheader with a PAT.
For private submodules or other repos, configure the URL with the token.