cicd
authentication
ai_generated
true
Error: fatal: could not read Username for 'https://github.com': terminal prompts disabled
ID: cicd/gha-checkout-failed
89%Fix Rate
88%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
The actions/checkout step fails due to authentication issues when cloning the repository. Common in private repos, cross-repo checkouts, and submodule scenarios.
genericWorkarounds
-
92% success Use actions/checkout with a PAT or deploy key for private/cross-repo access
Set 'token: ${{ secrets.PAT_TOKEN }}' in the checkout step for cross-repo access, or configure a deploy key for the specific repository -
87% success Configure persist-credentials and set proper permissions for submodules
Add 'submodules: recursive' and 'token: ${{ secrets.PAT_TOKEN }}' to the checkout step. Ensure the token has access to all submodule repositories
Dead Ends
Common approaches that don't work:
-
Use git clone with hardcoded credentials in a run step
85% fail
Credentials are exposed in workflow logs and violate security best practices; also breaks when credentials rotate
-
Disable checkout entirely and fetch code manually without proper auth
80% fail
Manual git operations without proper token setup face the same authentication issues
Error Chain
Leads to:
Preceded by:
Frequently confused with: