问题
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.
- Uninstall vsts-npm-auth package
- remove NPM cache
- delete .npmrc file under Users folder
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
来源:https://stackoverflow.com/questions/43840562/update-vsts-npm-auth-with-new-username-and-password