使用新的用户名和密码更新vsts-npm-auth [英] Update vsts-npm-auth with new username and password
问题描述
我已经使用以下命令安装了 vsts-npm-auth 软件包:
I have installed the vsts-npm-auth package using following command:
npm install -g vsts-npm-auth --registry https://registry.npmjs.com
然后我运行了 vsts-npm-auth -config .npmrc 命令来设置凭据,但是我遇到了以下错误:
And I ran vsts-npm-auth -config .npmrc command to set the credential but I am facing below error:
现在,我需要更新凭据,但它始终会获取现有的凭据.有什么方法可以发送 PUT 请求并更新凭据?
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.
- 卸载 vsts-npm-auth 软件包
- 删除 NPM缓存
- 删除用户"文件夹下的 .npmrc 文件
-
并在auth标志设置为false的情况下重新运行以下命令.它将要求获得信誉.
- 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
npm install -g vsts-npm-auth --registry https://registry.npmjs.com --always-auth false
这篇关于使用新的用户名和密码更新vsts-npm-auth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!