You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] OIDC publish failing from GitHub actions #8730
My publishing workflow for a nested package is failing with the following error:
npm error code E404
npm error 404 Not Found - PUT https://registry.npmjs.org/@sass%2ftypes - Not found
npm error 404
npm error 404 The requested resource '@sass/[email protected]' could not be found or you do not have permission to access it.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
You can see the wokflow here. It's invoked from ci.yml here.
I've verified that it's not the following gotchas:
The workflow is upgrading to the latest npm (line 119).
The workflow has the id-token: write permissions (line 40 of ci.yml).
The trusted publisher settings are pointing to the correct repo and the filename of the parent workflow:
Expected Behavior
I would expect npm publish to succeed and publish the package using OIDC.
Steps To Reproduce
Rerunning the GitHub Actions workflow reproduces this consistently
Environment
npm: Whatever npm@latest was at time of posting
Node.js: 24.11.0
OS Name: Ubuntu Linux
System Model Name: GitHub actions runner
npm config: GitHub actions default
Reacted by iatrophobic, Tomasz Pilch, Colin S., Keith Thompson, Jason Karns, Stephan Petzl, Adrien Crivelli, enchart, Alexander, Dunn and 29 more
In this case I used Node 24.x and NPM version 11.6.2. Node 22.x did not work for me.
I'm not sure if this will help.
Reacted by Dirk Wahrheit, Marçal Albert Castellví, Steven Roussey, Natalie Weizenbaum, Alex Wang, enchart, BestCodes, Sahil Gupta, Christoph, Dima Revutskyi and 3 more
Reacted by Dima Revutskyi and Harsh Ankur
Reacted by PBK Bin, Dima Revutskyi and Antoine Clausse
Thanks for the tip, @Jason3S. Passing --provenance to npm publish and setting "repo" to the repository that I was publishing from allowed me to deploy successfully.
Perhaps this should be added to the documentation?
Reacted by Kiberon Labs Dev, Alex Wang, enchart, Dima Revutskyi, Neven Jacmenović and Ahmad Nur Salim
Activity
[-][BUG] OIDC[/-][+][BUG] OIDC publish failing from GitHub actions[/+]dirkwa commentedon Nov 12, 2025
I have the same. Following.
chore: Reinstate npm publish token due to potential bug
iatrophobic commentedon Nov 16, 2025
same issue here had to revert to tokens
macalbert commentedon Nov 16, 2025
Same here https://github.com/macalbert/envilder/actions/runs/19404399928/job/55517129647
Jason3S commentedon Nov 16, 2025
@nex3,
There are a few things that I added to the workflow, to get it to work. I'm not sure which one is important in your case:
package.jsonadded:"provenance": trueenv: NPM_CONFIG_PROVENANCE: trueHere is a link to a successful run: https://github.com/streetsidesoftware/jest-mock-vscode/actions/runs/19406225809/job/55521264235
In this case I used Node 24.x and NPM version
11.6.2. Node 22.x did not work for me.I'm not sure if this will help.
Pass --provenance to `npm publish`
Pass --provenance to `npm publish` (#2681)
nex3 commentedon Nov 18, 2025
Thanks for the tip, @Jason3S. Passing
--provenancetonpm publishand setting"repo"to the repository that I was publishing from allowed me to deploy successfully.Perhaps this should be added to the documentation?
fix: Add explicit provenance configuration for OIDC publishing
fix(ci): revert to NODE_AUTH_TOKEN for npm publish
dragonman225 commentedon Nov 24, 2025
Using Node version 24 (instead of version 20 specified in the examples) and passing
--provenancetonpm publishwork for me.Btw, I noticed that
--provenanceis required only when publishing from a repository for the first time. After that, it can be removed.ci(publish): try to fix npm publish error
173 remaining items
chore(release): v0.1.4 + add repository field for OIDC trusted publis…
fix(ci): OIDC 发布 404 — 移除 setup-node registry-url 占位 token 干扰(npm/cli…
ci: fix OIDC publish — don't let setup-node shadow auth, bump npm in …
Fix OIDC publish: drop setup-node registry-url and git+ repository url
ci(publish): try --provenance (npm/cli#8730 fix for the OIDC exchange…
ci: publish via npm trusted publishing (OIDC) with token fallback
Fix OIDC publish: upgrade to Node 24 + npm latest, fix repository URLs
fix: OIDC publish — upgrade to Node 24 + npm latest, fix repository URLs
Publish via npm trusted publishing instead of a stored token
fix(ci): 发布 404 的真根因 —— setup-node 的 registry-url 抢占了 OIDC 认证
card-15.04: the release page carries a notice and a link, not the cha…
fix(ci): 发布工作流的四个问题(prepublishOnly 强制构建 + 三个 OIDC 坑)
ci: fix npm trusted publishing 404
fix: 发布流水线改用 node 24 并去掉 setup-node 的 registry-url
Fix local state files staying world-readable (D44, security audit fin…