We are evaluating Nexus Repository Manager 3 and have our users logging in via SAML Authentication. We have a private NPM repository and need to authenticate our users to it using NPM. I have added the npm Bearer Token Realm to the Realms in Administration and enabled user Tokens. I have then followed the guide here,
On setting up NPM. After following the guide I received the following error,
npm ERR! code ERR_INVALID_AUTH
npm ERR! Invalid auth configuration found: _auth
must be renamed to //nexu.local/nexus/repository/npm-group/:_auth
in user config
npm ERR! Please run npm config fix
to repair your configuration.`
I ran npm config fix as instructed and it seemed to move the _auth from it’s own line and appended it on our private registry link. Then when turning off Anonymous access and running npm install I get the following error,
npm ERR! code E401
npm ERR! Unable to authenticate, need: BASIC realm=“Sonatype Nexus Repository Manager”
Could you assist in how we move forward? My .npmrc file looks like this,
registry=https://nexus.local/nexus/repository/npm-group/
always-auth=true
email=my.email
//nexus.local/nexus/repository/npm-group/:_auth=“BASE64 VALUE FROM NEXUS USER TOKEN”
We are able to install from the npm-group repository when anonymous access is enabled, just not when requiring authentication.
Nexus PRO 3.61.0-02
Thank you
Chad