Skip to content

Commit 372a000

Browse files
fix: add git credentials for tag push in release workflow
The 'Push tag' step was failing with 'fatal: could not read Username for https://github.com: No such device or address' because persist-credentials: false on the checkout step removes the ephemeral GITHUB_TOKEN credential from .git/config. Re-establish git authentication by setting the remote URL with a token before git pull/tag/push. This maintains supply-chain security (keeps the token window minimal, only during the push step) while fixing the credential gap. Fixes release workflow failures when inputs.dev == false (production releases). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 73bc940 commit 372a000

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,10 @@ jobs:
185185

186186
- name: Push tag
187187
if: inputs.dev == false
188+
env:
189+
REPO: ${{ github.repository }}
188190
run: |
191+
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${REPO}"
189192
git pull
190193
git tag "$TAG_NAME"
191194
git push --tags

0 commit comments

Comments
 (0)