Skip to content

fix(ISSUE-16): clear .npmrc auth token before provenance publish#20

Merged
cuzfrog merged 1 commit into
mainfrom
ISSUE-16_fix-publish-v2
May 24, 2026
Merged

fix(ISSUE-16): clear .npmrc auth token before provenance publish#20
cuzfrog merged 1 commit into
mainfrom
ISSUE-16_fix-publish-v2

Conversation

@cuzfrog
Copy link
Copy Markdown
Owner

@cuzfrog cuzfrog commented May 24, 2026

Problem

npm publish --provenance was failing with 404 Not Found on the registry PUT. The OIDC flow worked for Sigstore provenance signing (succeeded), but the registry request fell through to the empty _authToken injected by actions/setup-node@v4 into the temporary .npmrc.

Fix

Before publishing, remove the authToken line from the temp .npmrc so npm uses OIDC (via id-token: write) for registry authentication instead of the empty token. Also adds --access public explicitly.

The OIDC trusted publisher flow was working for Sigstore provenance
but the registry PUT was falling through to the empty _authToken in
the temp .npmrc created by setup-node. The auth token line is now
removed before publish, letting npm use OIDC for registry auth.
@cuzfrog cuzfrog merged commit 17eb057 into main May 24, 2026
1 check passed
@cuzfrog cuzfrog deleted the ISSUE-16_fix-publish-v2 branch May 24, 2026 13:55
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