Conversation
…cation Co-authored-by: einari <134365+einari@users.noreply.github.com>
|
@copilot This doesn't sound right. Why would I still need a token for doing this - then I might as well just have a token instead of trusted publishing. Read up on how this works: https://docs.npmjs.com/trusted-publishers |
Co-authored-by: einari <134365+einari@users.noreply.github.com>
You're right. Reverted in dda0104. For npm trusted publishing, npm CLI automatically exchanges the GitHub OIDC token with npmjs.com for a short-lived publish token — no The 404 failure happens because npm's OIDC exchange with npmjs.com requires the package to be configured as a trusted publisher on npmjs.com (under the package's "Publishing Access" settings). If that configuration is missing or there's a mismatch (wrong repository name, workflow filename, etc.), the exchange fails and npm falls back to unauthenticated access, which npmjs.com rejects with 404. Please verify that |
|
asd |
|
@copilot This is the setting in NPM that we've had since we started this conversation - shouldn't this just work?
|
… exchange Co-authored-by: einari <134365+einari@users.noreply.github.com>
Yes, the trusted publisher config is correct — that's not the issue. The problem is Removing
Yes, and it should work — but Removed |

setup-nodewithregistry-url: "https://registry.npmjs.org"writes//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}to.npmrc. WhenNODE_AUTH_TOKENis not set, npm sees an empty_authTokenentry and sends the publish request unauthenticated — instead of performing the OIDC exchange with npmjs.com that trusted publishers rely on. This is why the registry returned404even though provenance signing via sigstore succeeded (that flow uses the OIDC JWT directly and is unaffected by.npmrc).Fixed
publish.yml: removedregistry-url: "https://registry.npmjs.org"fromsetup-node— without it,setup-nodeno longer creates the.npmrcentry that overrides the trusted publisher OIDC exchange; npm defaults tohttps://registry.npmjs.org/anyway so package resolution is unchanged;--provenanceandid-token: writecontinue to provide sigstore attestation📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.