关于npm:npm-login登录失败-code-E409Enter-onetime-password

12次阅读

共计 548 个字符,预计需要花费 2 分钟才能阅读完成。

npm ERR! code E409
npm ERR! 409 Conflict - PUT https://registry.npmmirror.com/-/user/org.couchdb.user:xxx - [conflict] User xxx already exists

npm ERR! A complete log of this run can be found in:

失败起因

能够看到 PUT 的地址并不是 registry.npmjs.org,而是 npmmirror

解决办法

终端输出

npm config set registry https://registry.npmjs.org

如图:

最初一步又进去了一个 Enter one-time password from your authenticator app,意思是须要应用 authenticator 校验。

增加 2FA

登录 npmjs.com 点击集体账号

在配置文件设置页面上的“双因素身份验证”下,单击启用 2FA。

在 2FA 设置页面上,抉择您要启用的模式。

最初扫描网页的二维码增加到你的 Authenticator 中。

千万不要忘了滚动网页,底部还要输出 6 位 code 验证。

验证胜利后,在终端 npm login 里就能够登录啦。

参考文章:https://docs.npmjs.com/config…。配置两步验证

正文完
 0