Update vsts-npm-auth with new username and passwor

2019-09-17 16:45发布

问题:

I have installed the vsts-npm-auth package using following command:

npm install -g vsts-npm-auth --registry https://registry.npmjs.com

And I ran vsts-npm-auth -config .npmrc command to set the credential but I am facing below error:

Now I need to update the credential but it always fetches the existing credential. Is there any way to send PUT request and update the credential ?

回答1:

I made it work with help of my colleague.

  1. Uninstall vsts-npm-auth package
  2. remove NPM cache
  3. delete .npmrc file under Users folder
  4. And re-run the below command with auth flag set to false. It will ask for the creds.

    npm install -g vsts-npm-auth --registry https://registry.npmjs.com --always-auth false