Skip to content

fix(release): give the credential preflight a registry to authenticate against - #13

Merged
phall1 merged 1 commit into
mainfrom
npm-preflight-auth
Aug 9, 2026
Merged

fix(release): give the credential preflight a registry to authenticate against#13
phall1 merged 1 commit into
mainfrom
npm-preflight-auth

Conversation

@phall1

@phall1 phall1 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

The preflight from #11 failed with ENEEDAUTH instead of reporting the account:

npm whoami failed: npm error code ENEEDAUTH
npm error need auth This command requires you to be logged in.

registry-url on actions/setup-node is what writes the .npmrc containing the NODE_AUTH_TOKEN reference. The verify job didn't pass it, so the token was in the environment and npm ignored it.

The publish jobs already set it, so this only affected the diagnostic — but a diagnostic that can't authenticate answers nothing, which is why the last run still didn't tell us who the token is.

…e against

The preflight added in the previous commit failed with ENEEDAUTH rather than
reporting the account, because the verify job's setup-node had no registry-url.
That option is what writes the .npmrc containing the NODE_AUTH_TOKEN reference;
without it the token sits in the environment and npm never reads it.

The publish jobs already pass registry-url, so this only ever affected the
diagnostic — but a diagnostic that cannot authenticate answers nothing.
@phall1
phall1 merged commit a751a8d into main Aug 9, 2026
1 check passed
@phall1
phall1 deleted the npm-preflight-auth branch August 9, 2026 17:28
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