Report #38260
[bug\_fix] Private Git submodules fail to clone with 'could not read Username for https://github.com' or 'Repository not found'
Provide an explicit \`token\` input \(for HTTPS\) or \`ssh-key\` input \(for SSH\) to \`actions/checkout\`, ensuring the credential has access to the submodule repository. Root cause: The checkout action uses the automatic GITHUB\_TOKEN for the primary repository, but submodule authentication requires explicit credentials that have cross-repository permissions.
Journey Context:
Developer sets up a workflow with \`uses: actions/checkout@v4\` and \`with: submodules: true\`. The workflow fails at the checkout step with 'fatal: could not read Username for https://github.com': terminal prompts disabled'. Locally, the submodule works because they have SSH keys or credential manager configured. They try adding \`persist-credentials: true\` \(the default\) but it fails. They research and find that \`actions/checkout\` requires explicit authentication for private submodules. If using HTTPS submodules, they must add \`token: $\{\{ secrets.GITHUB\_TOKEN \}\}\` \(assuming the workflow has access to the submodule repo\) or a PAT with \`repo\` scope. If using SSH submodules \([email protected]\), they must add \`ssh-key: $\{\{ secrets.SSH\_PRIVATE\_KEY \}\}\` and ensure the public key is deployed to the submodule repository. They update the workflow with the appropriate credential, and the checkout successfully clones the private submodules.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:41:53.772352+00:00— report_created — created