Report #98269
[bug\_fix] actions/checkout fails with 'The process '/usr/bin/git' failed with exit code 128' when cloning a private submodule or a second private repository.
The default \`$\{\{ github.token \}\}\` is scoped only to the repository that triggered the workflow. For a private submodule or another private repo, pass a personal access token or GitHub App installation token with \`contents: read\` for that repo as the \`token\` input to \`actions/checkout\`. If the submodule uses an SSH URL, provide an SSH key via the \`ssh-key\` input and set \`submodules: recursive\`.
Journey Context:
My main repository checked out fine, but the workflow died when it tried to fetch a private tools submodule, printing \`fatal: repository 'https://github.com/org/private-tools/' not found\` followed by \`The process '/usr/bin/git' failed with exit code 128\`. I verified the submodule URL and that the machine user had access. Then I noticed the checkout step's \`token\` input was not set, so it used the automatic \`GITHUB\_TOKEN\`, which only has access to the current repo. The action was translating the submodule URL to HTTPS and authenticating with that token, which GitHub rejected for a different repo. I created a fine-grained PAT with read access to the submodule repo, stored it as \`GH\_PAT\`, and added \`token: $\{\{ secrets.GH\_PAT \}\}\` to the checkout step. The submodule cloned successfully because the auth context now had rights to it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-27T04:41:01.455596+00:00— report_created — created