Skip to content

fix: persist credentials for git push in update-major-minor-tags workflow#312

Merged
eifinger merged 1 commit intoastral-sh:mainfrom
eifinger-bot:fix/persist-credentials
Jan 30, 2026
Merged

fix: persist credentials for git push in update-major-minor-tags workflow#312
eifinger merged 1 commit intoastral-sh:mainfrom
eifinger-bot:fix/persist-credentials

Conversation

@eifinger-bot
Copy link
Contributor

Problem

After upgrading to actions/checkout@v6, the update-major-minor-tags workflow fails with:

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

Example: https://github.com/astral-sh/ruff-action/actions/runs/21509988231/job/61974754475

Root Cause

actions/checkout@v6 changed the behavior of persist-credentials: false. In v6, credentials are immediately cleaned up after checkout, whereas in v5 they remained available during the job.

The workflow sets persist-credentials: false and then tries to git push — but the auth credentials are already gone.

Fix

Explicitly set persist-credentials: true (removing the false value). The workflow already has minimal permissions (contents: write) scoped only to this job, so this is safe.

Added a zizmor: ignore[artipacked] comment in case the security linter flags this pattern.

@eifinger-bot eifinger-bot force-pushed the fix/persist-credentials branch from f420615 to 926f020 Compare January 30, 2026 18:25
…flow

actions/checkout@v6 changed behavior - when persist-credentials is false,
credentials are immediately cleaned up after checkout. This caused the
git push commands to fail with 'could not read Username' error.

Setting persist-credentials: true keeps the token available for the
git push operations. The workflow already has minimal permissions
(contents: write) scoped only to this job.

Refs: https://github.com/astral-sh/ruff-action/actions/runs/21509988231/job/61974754475
@eifinger-bot eifinger-bot force-pushed the fix/persist-credentials branch from 926f020 to e0255e6 Compare January 30, 2026 18:38
@eifinger eifinger merged commit 4919ec5 into astral-sh:main Jan 30, 2026
66 checks passed
@eifinger eifinger added the ci Changes to automatic workflows label Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Changes to automatic workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants