我正在尝试通过GitHub软件包注册表发布npm软件包,我正在遵循文档,当我输入username
和之后尝试使用以下命令登录时password
(即使两者都是正确的),我总是会遇到以下错误。
// Step 2: Authenticate
$ npm login --registry=https://npm.pkg.github.com/
错误日志:
npm login --registry=https://npm.pkg.github.com/
Username: ***********
Password:
Email: (this IS public) *****************
npm ERR! code E401
npm ERR! Registry returned 401 for PUT on https://npm.pkg.github.com/-/user/org.couchdb.user:kgangadhar: Error authenticating user: Bad credentials
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\karth\AppData\Roaming\npm-cache\_logs\2019-10-31T05_35_05_829Z-debug.log
有人知道如何解决吗?
您是否在github帐户上启用了2因素身份验证?如果是这样,请尝试创建令牌并使用该令牌代替密码。以下是创建令牌的说明:https : //help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
希望这可以帮助
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句