Skip to content

fix(release): authenticate git before the guard steps - #20

Merged
Troublor merged 2 commits into
mainfrom
troublor/fix/git-auth-before-guard
Sep 7, 2026
Merged

Troublor merged 2 commits into
mainfrom
troublor/fix/git-auth-before-guard

Conversation

@Troublor

@Troublor Troublor commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

First pilot dispatch on mega-agents (run 34103464078) failed in release-candidate's guard: fatal: could not read Username for 'https://github.com'. Consumers check out with persist-credentials: false (as the templates say), so the clone has no credentials and git fetch --tags / git ls-remote fail on a private repo. release-candidate never configured git auth; release-settle and release-publish configured it only after their guard step, which also fetches.

  • All three actions now set the app-token extraheader as their first step — unsetting any header a persisted checkout left, since git sends every configured one — and remove it in an if: always() step.
  • release-candidate drops the header before create-pull-request, which authenticates its own push with the token input.
  • Generated chore/release-settle-* / chore/changelog-* branches are pushed with --force instead of --force-with-lease: on a re-run there is no remote-tracking ref for them, so the lease rejects exactly the case it should allow.

Validated: YAML parses, shellcheck clean, unit tests pass. Consumers track @main, so no caller change is needed; the pilot re-dispatches after merge.

🤖 Generated with Claude Code

Troublor and others added 2 commits September 7, 2026 17:06
Consumers check out with persist-credentials: false, so the clone has no
credentials and the guards' git fetch / ls-remote fail on a private repo
('could not read Username'). release-candidate never configured auth;
settle and publish configured it only after their guard. Every action now
sets the app-token extraheader as its first step (dropping any header a
persisted checkout left, since git sends all of them) and removes it in an
always() step; candidate drops it before create-pull-request, which
authenticates its own push.

Also push the generated settle/changelog branches with --force rather than
--force-with-lease: there is no remote-tracking ref for them on a re-run,
so the lease would reject the exact case it is meant to allow.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013eLFMaDpEwgDzyDBzCQzLH
@Troublor
Troublor merged commit a3df05f into main Sep 7, 2026
1 check passed
@Troublor
Troublor deleted the troublor/fix/git-auth-before-guard branch September 7, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant