Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Publish artifact using bash on github actions to npm registry #8060

Closed
2 tasks done
P4dr4 opened this issue Jan 24, 2025 · 1 comment
Closed
2 tasks done

[BUG] Publish artifact using bash on github actions to npm registry #8060

P4dr4 opened this issue Jan 24, 2025 · 1 comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps

Comments

@P4dr4
Copy link

P4dr4 commented Jan 24, 2025

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

Here you have the error, on the integration pipeline:
Image

Expected Behavior

To publish an artifact on npm registry on a automate way using the github actions framework

Steps To Reproduce

  1. Setup an npm artifact and account
  2. With a composite action workflow
  3. Run the workflow with github actions, setting npm user, email, password and token as secrets
  4. See error...

Environment

https://github.com/P4dr4/apolo/actions/runs/12957324570/job/36145430818

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2025-01-24T20_51_32_051Z-debug-0.log
info attempt registry request try #1 at 8:51:32 PM
http request PUT https://registry.npmjs.org/-/user/org.couchdb.user:***
http 401 https://registry.npmjs.org/-/user/org.couchdb.user:***
WARN notice Please check your email for a one-time password (OTP)
WARN adduser Incorrect username or password
WARN adduser You can reset your account by visiting:
WARN adduser
WARN adduser https://npmjs.org/forgot
WARN adduser
/opt/hostedtoolcache/node/20.18.1/x64/lib/node_modules/npm-cli-login/lib/index.js:11
throw new Error(err);
^
Error: Error: failed to authenticate: A One Time Password (OTP) by email is required. : -/user/org.couchdb.user:***
at /opt/hostedtoolcache/node/20.18.1/x64/lib/node_modules/npm-cli-login/lib/index.js:11:19
at /opt/hostedtoolcache/node/20.18.1/x64/lib/node_modules/npm-cli-login/lib/login.js:59:24
at /opt/hostedtoolcache/node/20.18.1/x64/lib/node_modules/npm-cli-login/node_modules/npm-registry-client/lib/adduser.js:125:14
at /opt/hostedtoolcache/node/20.18.1/x64/lib/node_modules/npm-cli-login/node_modules/npm-registry-client/lib/adduser.js:73:16
at f (/opt/hostedtoolcache/node/20.18.1/x64/lib/node_modules/npm-cli-login/node_modules/once/once.js:25:25)
at /opt/hostedtoolcache/node/20.18.1/x64/lib/node_modules/npm-cli-login/node_modules/npm-registry-client/lib/request.js:91:10
at /opt/hostedtoolcache/node/20.18.1/x64/lib/node_modules/npm-cli-login/node_modules/npm-registry-client/lib/request.js:105:12
at f (/opt/hostedtoolcache/node/20.18.1/x64/lib/node_modules/npm-cli-login/node_modules/once/once.js:25:25)
at RegClient. (/opt/hostedtoolcache/node/20.18.1/x64/lib/node_modules/npm-cli-login/node_modules/npm-registry-client/lib/request.js:324:12)
at Request._callback (/opt/hostedtoolcache/node/20.18.1/x64/lib/node_modules/npm-cli-login/node_modules/npm-registry-client/lib/request.js:216:14)
Node.js v20.18.1

//registry.npmjs.org/:_authToken = (protected)
registry = "https://registry.npmjs.org/"

; node version = v22.11.0
; npm version = 11.0.0
; Run npm config ls -l to show all defaults.

@P4dr4 P4dr4 added Bug thing that needs fixing Needs Triage needs review for next steps labels Jan 24, 2025
@milaninfy
Copy link
Contributor

@P4dr4 I believe based on your logs, this might be related to the library (npm-cli-login) you are using to login into npm. Try using commands like npm login and npm adduser of npm cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps
Projects
None yet
Development

No branches or pull requests

2 participants