auto icon indicating copy to clipboard operation
auto copied to clipboard

publishing fails with NPM automation token

Open mrtnbroder opened this issue 3 years ago • 6 comments

Describe the bug

I've setup an NPM Automation Token to allow auto to publish to npm, however, it looks like there is (still) an issue with lerna publish maybe missing --no-verify-access?

This is the workflow failing:

https://github.com/unperfekt/auto-poc/runs/4958992908?check_suite_focus=true

lerna notice cli v4.0.0
lerna info versioning independent
lerna info ci enabled
lerna WARN Unable to determine published version, assuming "@unperfekt/test-package-auto-poc-b" unpublished.
lerna WARN Unable to determine published version, assuming "@unperfekt/test-package-auto-poc-a" unpublished.
lerna info auto-confirmed 
lerna info publish Publishing packages to npm...
lerna info Verifying npm credentials
lerna http fetch GET 403 https://registry.npmjs.org/-/npm/v1/user 78ms
403 Forbidden - GET https://registry.npmjs.org/-/npm/v1/user
lerna ERR! EWHOAMI Authentication error. Use `npm whoami` to troubleshoot.

    at ChildProcess.<anonymous> (/home/runner/work/auto-poc/auto-poc/node_modules/@auto-it/core/dist/utils/exec-promise.js:58:31)
    at ChildProcess.emit (node:events:390:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)Error
    at Object.execPromise (/home/runner/work/auto-poc/auto-poc/node_modules/@auto-it/core/dist/utils/exec-promise.js:15:22)
    at /home/runner/work/auto-poc/auto-poc/node_modules/@auto-it/npm/dist/index.js:944:30
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Versions I'm using:

"devDependencies": {
    "auto": "^10.32.6",
    "lerna": "^4.0.0"
  },

you can also just clone the repo and take a look at it yourself: https://github.com/unperfekt/auto-poc

  • make sure you pass an ci automation NPM_TOKEN
  • make sure you edit the packge names to be able to publish

mrtnbroder avatar Jan 26 '22 23:01 mrtnbroder

We added a few --no-verify-access calls in https://github.com/intuit/auto/pull/2032/ , but it's possible I might have missed a spot: have you been able to use this automation token successfully elsewhere (outside of auto)?

hydrosquall avatar Feb 14 '22 20:02 hydrosquall

@hydrosquall I'm experiencing this issue as well. The missing --no-verify-access flag appears to be here.

smithki avatar Mar 25 '22 00:03 smithki

Submit a pr and I can merge it 🏂

hipstersmoothie avatar Mar 25 '22 01:03 hipstersmoothie

@hipstersmoothie please review this PR I've checked that this change works locally

karpoff avatar May 25 '22 08:05 karpoff

I think this issue can be closed since https://github.com/intuit/auto/pull/2205 shipped - were you able to try out the new version @mrtnbroder ?

hydrosquall avatar Sep 21 '22 02:09 hydrosquall

issue has been fixed

karpoff avatar Sep 21 '22 12:09 karpoff

Fixed by #2205.

zephraph avatar Oct 04 '22 14:10 zephraph