Skip to content

fix: add git credentials for tag push in release workflow (AST-163939)#217

Open
cx-atish-jadhav wants to merge 1 commit into
mainfrom
fix/release-git-push-credentials
Open

fix: add git credentials for tag push in release workflow (AST-163939)#217
cx-atish-jadhav wants to merge 1 commit into
mainfrom
fix/release-git-push-credentials

Conversation

@cx-atish-jadhav

Copy link
Copy Markdown

Problem

The 'Push tag' step in the release workflow was failing with:

fatal: could not read Username for 'https://github.com': No such device or address

This prevented production (non-dev) releases from succeeding.

Root Cause

Commit c04c499 ("Fix unit test cases", Jul 12) replaced fetch-depth: 0 with persist-credentials: false on the release job's checkout step. While this correctly prevents the ephemeral GITHUB_TOKEN from being cached on disk during the vulnerable npm ci and npm run build phases (reducing supply-chain attack surface), it left no credential for the later git push --tags step.

Solution

Before git pull/tag/push, re-establish authentication by setting the remote URL with the token:

git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${REPO}"

This maintains security (token window remains minimal, only during the push step) while fixing the credential gap.

Testing

Ready to re-trigger the release workflow once this merges to main.

🤖 Generated with Claude Code

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>
@cx-atish-jadhav cx-atish-jadhav changed the title fix: add git credentials for tag push in release workflow fix: add git credentials for tag push in release workflow (AST-163939) Jul 22, 2026
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.

2 participants