fix(publish): authenticate pnpm publish via ~/.npmrc, not a URL-scoped env var (RIG-2187) - #3
Merged
Conversation
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
rigel-mintaka
force-pushed
the
compass-ui/rig-2187-publish-authfix
branch
from
August 23, 2026 14:38
a7ddff5 to
13e68f3
Compare
…d env var (RIG-2187) The first tagged publish of @rigelbuild/solid-virtual@3.0.0-rc.0 failed with a 404 on the PUT: the publish went out unauthenticated. Root cause: the auth token was passed as a GitHub Actions step env var literally named `pnpm_config_//registry.npmjs.org/:_authToken`, but Actions env-var names may only contain [A-Za-z0-9_] — a name with `/`, `:` and `.` is never exported to the step, so pnpm never received the credential and npm answers a scoped unauthenticated write with 404 (not 401). The clean-named `pnpm_config_provenance` exported fine, which is why only auth broke. Fix (source-verified against pnpm 11.9.0): write the per-registry `//registry.npmjs.org/:_authToken` into the user-level `~/.npmrc` from the clean-named `NPM_TOKEN` secret before `pnpm publish`. pnpm's credential reader (getNetworkConfigs -> configByUri) consumes the user npmrc unconditionally, so the token reaches the publish request. The npmrc is written on the CI runner only, so the upstreamable package diff (DL-015) is untouched. Provenance stays off via the env key and job permissions stay `contents: read` (no OIDC). Nothing was published on the failed run (404 = create rejected), so 3.0.0-rc.0 is not burned; re-tag re-triggers the publish.
rigel-mintaka
force-pushed
the
compass-ui/rig-2187-publish-authfix
branch
from
August 23, 2026 14:44
13e68f3 to
2a9beda
Compare
mattwilkinsonn
marked this pull request as ready for review
August 23, 2026 16:23
mattwilkinsonn
approved these changes
Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first tagged publish of @rigelbuild/solid-virtual@3.0.0-rc.0 failed with a
404 on the PUT: the publish went out unauthenticated. Root cause: the auth
token was passed as a GitHub Actions step env var literally named
pnpm_config_//registry.npmjs.org/:_authToken, but Actions env-var names mayonly contain [A-Za-z0-9_] — a name with
/,:and.is never exported tothe step, so pnpm never received the credential and npm answers a scoped
unauthenticated write with 404 (not 401). The clean-named
pnpm_config_provenanceexported fine, which is why only auth broke.
Fix (source-verified against pnpm 11.9.0): write the per-registry
//registry.npmjs.org/:_authTokeninto the user-level~/.npmrcfrom theclean-named
NPM_TOKENsecret beforepnpm publish. pnpm's credential reader(getNetworkConfigs -> configByUri) consumes the user npmrc unconditionally, so
the token reaches the publish request. The npmrc is written on the CI runner
only, so the upstreamable package diff (DL-015) is untouched. Provenance stays
off via the env key and job permissions stay
contents: read(no OIDC).Nothing was published on the failed run (404 = create rejected), so 3.0.0-rc.0
is not burned; re-tag re-triggers the publish.