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 ?
I made it work with help of my colleague.
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
If the above solution is not working. I am adding a few more steps to the above answer
Uninstall vsts-npm-auth package
remove NPM cache
delete .npmrc file under Users folder //new steps
https://github.com/Microsoft/azure-pipelines-tasks/issues/6733#issuecomment-376604435
As mentioned in the link remove the already existing token and details to show the login prompt again
open regedit (windowsKey + R + type "regedit")
delete -> HKEY_CURRENT_USER\SOFTWARE\Microsoft\VSCommon\14.0\ClientServices\TokenStorage\VisualStudio\VssApp
Restart your system
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
vsts-npm-auth -config .npmrc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With