[ci] actions/checkout@v4 has intermittent auth bug against forge.ourworld.tf — document workaround #200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
On some lhumina_code repos,
actions/checkout@v4fails on PR checkout with:Even when:
FORGEJO_TOKENsecret IS set at the org or repo level${{ secrets.FORGEJO_TOKEN }}clearly reaches the workflow (verified by debug step: token length 40, valid hex)curl -H 'Authorization: token $TOKEN' /api/v1/userreturns 200 andgit clone https://oauth2:$TOKEN@forge.ourworld.tf/...succeeds inside the runnerwith: token: ${{ secrets.FORGEJO_TOKEN }}Affected repos (as of 2026-04-28)
Unaffected repos using same
actions/checkout@v4Root cause (best understanding)
actions/checkout@v4usesgit config http.<url>.extraheader "AUTHORIZATION: basic <base64(x-access-token:TOKEN)>"for auth. Against forge.ourworld.tf this works in some contexts and not others — likely depends on per-repo runner state, action cache, or something Forgejo-runner-specific that I haven't been able to isolate. The workaround is reliable; the action behavior is not.Reliable workaround — manual clone
Replace:
with:
Needs
FORGEJO_TOKENsecret (org or repo level) holding a Forgejo PAT withread:repositoryscope. Same shape as the cross-repo deps clone step that already lives in many of these workflows, so no new auth surface.Applied today on hero_cluster (development_mik) and hero_editor (development_mik).
Action items
actions/checkoutships a Forgejo-compatible release, revert to the canonicaluses: actions/checkout@v4form and close this issue.Signed-off-by: mik-tf
Documented in hero_skills
The workaround + the broader CI patterns this week surfaced are now in
hero_skills/tools/docs/forgejo_ci.md(PR #145) — that's the canonical place for cross-repo CI patterns.This issue stays as the lightweight tracker for the
actions/checkout@v4upstream bug specifically; close it when the action ships a Forgejo-compatible release and the manual-clone workaround can be reverted.Signed-off-by: mik-tf