npm / npm/cli

[BUG] ENEEDAUTH when trying to publish to private jfrog artifactory after upgrade of npm

Open
#6,172 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Priority 2 Release 9.x
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

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

Everything was working until I updated Node (and npm). Now I keep getting this:

npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in to https://domain/artifactory/api/npm/npm
npm ERR! need auth You need to authorize this machine using `npm adduser`
Expected Behavior

Expecting to succeed publish

Steps To Reproduce

My local .npmrc file:

registry=https://domain/artifactory/api/npm/npm/
always-auth=true
email=stan@domain.com
//domain/artifactory/api/npm/npm/:_auth=<token>

I tried plain npm publish and also with parameters with no success

npm publish --userconfig=./.npmrc --registry=https://domain/artifactory/api/npm/npm/

npm whoami returns my user and everything looks good

Environment
  • npm: 9.3.1
  • Node.js:18.14.0
  • OS Name: Linux

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied .npmrc configuration and reproduce the failure using npm 9.3.1, Node.js 18.14.0, and the documented npm publish command against the private Artifactory registry. Compare the publish authentication behavior with npm whoami, and consider the issue resolved when publishing succeeds with the provided token-based configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.