Checkout fails in CI with "[email protected]: Permission denied (publickey). fatal: Could not read from remote repository." for a submodule.
BeginnerTroubleshootingPipeline outages
Answer
Likely causes → The job's credentials can read the main repo but not the submodule. GITHUB_TOKEN is scoped to the current repository, and an SSH deploy key works for one repo only. The submodule URL may also be SSH while the runner only has an HTTPS token.
Diagnose →
cat .gitmodules
git config --get-regexp 'url\..*insteadOf'
Fix → Give checkout a credential with access to both, such as a GitHub App installation token or a fine-grained PAT, and use HTTPS URLs:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ steps.app-token.outputs.token }}
Prevent → Use relative or HTTPS submodule URLs and GitHub App tokens (short-lived) rather than personal keys tied to someone's account.
More on Pipeline outages
Every GitHub Actions job in the org sits at "Waiting for a runner to pick up this job..." for 30 minutes.BeginnerJenkins builds on one agent fail with "java.io.IOException: No space left on device" while checking out code.BeginnerA deploy workflow that worked yesterday fails at `aws-actions/configure-aws-credentials` with "Not authorized to perform sts:AssumeRoleWithWebIdentity".IntermediateEvery pipeline in the company fails at the dependency step with "npm ERR! 503 Service Unavailable" (or PyPI/Maven timeouts) because an upstream registry is having an outage.Intermediate`terraform apply` in CI fails with "Error acquiring the state lock: ConditionalCheckFailedException" and shows a lock from a pipeline run that was cancelled two hours ago.BeginnerArgo CD shows the `payments` app permanently `OutOfSync` and self-heal keeps fighting: replicas jump between 3 and 12 every few minutes.Intermediate