Skip to content

npm trusted publishing rejects the release train — ENEEDAUTH on npm publish --provenance (release stranded since Nov 30) #1154

Backlog

Description

@efizzybot

Symptom

The deploy train's Publish framework packages to npm job fails with:

npm notice version: 3.0.0-rc.19
npm notice npm tokens that bypass 2FA are being restricted for account changes and direct publishing.
           Learn how to prepare: https://gh.io/npm-gat-bypass2fa-deprecation
npm error code ENEEDAUTH
npm error need auth This command requires you to be logged in to https://registry.npmjs.org/
Error: Command failed: npm publish --provenance --access public --tag rc .release/every-plugin

Runs: 46524206783 (failed twice — original leg + --failed re-dispatch, identical error). The job publishes idempotently per package; better-near-auth@2.0.0-rc.9 skips as already-published, every-plugin@3.0.0-rc.19 fails the OIDC exchange. Image/deploy legs stay skipped, so the release has been stranded since Nov 30 — production still serves the pre-#1117 CSS scheme.

What this is NOT

  • Not transient: identical failure on the re-dispatch.
  • Not a workflow regression: id-token: write is set, no registry-url/_authToken injection (that trap is documented in deploy.yml:213-215), and the same flow published everything-dev@2.0.0-rc.46 on Nov 20 and better-near-auth@2.0.0-rc.9 on Nov 19. No publish-auth change since.
  • Not missing permissions: the job carries contents: write + id-token: write (deploy.yml:200-202).

Likely cause

npm-side. The failure prints npm's 2FA-token-restriction deprecation notice at the exact rejection moment, and npm's trusted-publisher defaults shifted during 2026: connections created after 2026-09-03 default to npm stage publish with direct publishing as an opt-in. The repo's own deploy.yml comment anticipates this class: "when the registry rejects the token exchange (e.g. trusted-publisher mismatch or missing 'npm publish' allowance) — publish fails with a bare ENEEDAUTH, the real reason is only logged at verbose level inside npm's debug log." npm/cli#9088 tracks the misleading diagnostics.

Recovery (human, on npmjs.com)

  1. For each of every-plugin, everything-dev, better-near-auth: npmjs.com → package → Settings → Trusted Publisher — verify org/repo (NEARBuilders/everything-dev), workflow filename (deploy.yml), environment (must match the workflow's, or be blank if the workflow declares none), and that direct npm publish is allowed (not staged-publish-only).
  2. If the allowance is missing, re-grant it — either in the dashboard or interactively: npm trust github <package> --repo NEARBuilders/everything-dev --file deploy.yml --allow-publish (needs npm ≥ 11.15, account 2FA login).
  3. Follow the deprecation notice's guidance (gh.io/npm-gat-bypass2fa-deprecation) if the account-level policy is the blocker.
  4. Then re-dispatch from HEAD: gh run rerun <run-id> --failed — every leg is idempotent; already-published versions skip.

Context

Activity

  1. added
    needs-triage
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions