After configuring .npmrc with the following command "npm login" fails with error 401:
npm config set @<SCOPE>:registry https://davidpart.jfrog.io/davidpart/api/npm/npm/
Steps to reproduce:
- npm config set @<SCOPE>:registry https://<ARTIFACTORY_URL>:8081/artifactory/api/npm/npm/
- npm login with Artifactory credentials
Output:
npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR! https://www.npmjs.com/forgot
npm ERR!
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR! npm login
Workaround:
- Remove .npmrc file
- Configure your default npm registry with an Artifactory npm repository with the next command:
npm config set registry https://<ARTIFACTORY_URL>:8081/artifactory/api/npm/npm/
- Npm login with your Artifactory login credentials
- Install the npm scoped package with the next command:
- Npm install @angular/<Example>