Skip to content

fix(ISSUE-16): unset NODE_AUTH_TOKEN before OIDC provenance publish#21

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

fix(ISSUE-16): unset NODE_AUTH_TOKEN before OIDC provenance publish#21
cuzfrog merged 1 commit into
mainfrom
ISSUE-16_fix-publish-v3

Conversation

@cuzfrog
Copy link
Copy Markdown
Owner

@cuzfrog cuzfrog commented May 24, 2026

Problem

npm publish --provenance --access public fails because actions/setup-node@v4 sets NODE_AUTH_TOKEN (even when empty). npm 10 reads this env var directly as an auth token, which causes it to skip the OIDC trusted publisher flow.

  • With the empty token: registry returns 404 (anonymous/session with empty token cannot access scoped package)
  • Without the token: registry returns ENEEDAUTH (npm uses OIDC for Sigstore but not for registry auth)

Fix

Unset NODE_AUTH_TOKEN in the publish step shell before running npm publish --provenance --access public. This allows npm to use the OIDC token exchange for both registry authentication and provenance signing.

@cuzfrog cuzfrog merged commit 5197f9a into main May 24, 2026
1 check passed
@cuzfrog cuzfrog deleted the ISSUE-16_fix-publish-v3 branch May 24, 2026 13:57
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