Skip to content

Fix sync-versions auth for private repo clones#4547

Merged
caseydavenport merged 1 commit intotigera:masterfrom
caseydavenport:casey-sync-versions-fix
Mar 13, 2026
Merged

Fix sync-versions auth for private repo clones#4547
caseydavenport merged 1 commit intotigera:masterfrom
caseydavenport:casey-sync-versions-fix

Conversation

@caseydavenport
Copy link
Member

Follows up on #4544 — turns out actions/checkout@v4 injects an http.<url>.extraheader into the repo's local git config containing the default GITHUB_TOKEN. This takes precedence over credential helpers at the protocol level, so our credential.helper store with MARVIN_PAT was never actually being used for the calico-private clone. Since GITHUB_TOKEN only has access to tigera/operator, the clone fails with "Invalid username or token".

Adding persist-credentials: false to the checkout step prevents it from injecting that extraheader, letting our credential helper handle auth instead.

actions/checkout injects an extraheader with the default GITHUB_TOKEN
into the repo's local git config, which takes precedence over our
credential helper. Since GITHUB_TOKEN only has access to tigera/operator,
this was causing auth failures when cloning tigera/calico-private.
@caseydavenport caseydavenport merged commit fd3f753 into tigera:master Mar 13, 2026
8 of 9 checks passed
@caseydavenport caseydavenport deleted the casey-sync-versions-fix branch March 13, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants