Skip to content

fix(ci): add --no-verify-access to unblock lerna publish (EWHOAMI 403)#61

Open
mohdashraf010897 wants to merge 1 commit into
mainfrom
fix/npm-publish-no-verify-access
Open

fix(ci): add --no-verify-access to unblock lerna publish (EWHOAMI 403)#61
mohdashraf010897 wants to merge 1 commit into
mainfrom
fix/npm-publish-no-verify-access

Conversation

@mohdashraf010897

Copy link
Copy Markdown
Collaborator

Description

The npm-publish workflow fails at the publish step on main, blocking the @adobe/griffon-toolkit-aep-mobile@0.14.0 release (PR #60).

Root cause — not a dead token. The Authenticate step's npm whoami succeeds (returns the bot user adobe-admin). The failure is in lerna 4's pre-publish access verification:

lerna info Verifying npm credentials
lerna http fetch GET 403 https://registry.npmjs.org/-/npm/v1/user
lerna ERR! EWHOAMI Authentication error. Use `npm whoami` to troubleshoot.

lerna 4 verifies access by calling the legacy /-/npm/v1/user endpoint, which returns 403 for npm automation/granular tokens — a known limitation (lerna#2788, lerna#1574). The token itself has publish rights; only this pre-check is incompatible.

Fix

Add --no-verify-access to the lerna publish invocation. This skips the /-/npm/v1/user pre-check while leaving the actual publish authentication intact. Newer lerna versions made --no-verify-access the default for exactly this reason.

- run: npx lerna publish from-package --yes
+ run: npx lerna publish from-package --yes --no-verify-access

How Has This Been Tested?

Verified locally as far as is possible without the org publish token (which only exists in CI):

  • The pinned lerna 4.0.0 (what CI runs after npm ci) accepts --no-verify-accesslerna publish --help lists it: "Do not verify package read-write access for current npm user."
  • @adobe/griffon-toolkit-aep-mobile@0.14.0 builds (tsc) and npm packs cleanly — the artifact is releasable; the verify-access call was the only blocker.

The auth handshake itself can only be exercised by an actual publish run. Because the workflow uses lerna publish from-package, merging (or a workflow_dispatch) will publish only versions not already on the registry — i.e. just aep-mobile@0.14.0. Low blast radius.

Notes

This addresses the npm-publish failure only. The other red checks on main (Publish Docs / GH Pages, ci/circleci: build) appear to be separate infra issues and are not addressed here.

The npm-publish workflow fails at the publish step with:
  lerna http fetch GET 403 https://registry.npmjs.org/-/npm/v1/user
  lerna ERR! EWHOAMI Authentication error.

The publish token is valid — `npm whoami` in the Authenticate step
succeeds (returns the bot user). The failure is lerna 4's pre-publish
access check, which calls the legacy `/-/npm/v1/user` endpoint; that
endpoint returns 403 for npm automation/granular tokens. This is a known
lerna limitation (lerna#2788, lerna#1574), and `--no-verify-access` skips
exactly that check while leaving the real publish auth intact. Later lerna
versions made this the default.

Verified locally: lerna 4.0.0 (the pinned version CI runs) accepts the
flag; @adobe/griffon-toolkit-aep-mobile@0.14.0 builds and packs cleanly.

Unblocks the 0.14.0 release.
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