【发布时间】:2017-10-26 09:17:59
【问题描述】:
我在使用包管理提要发布 npm 包时遇到问题。
>vsts-npm-auth -config .npmrc
vsts-npm-auth v0.25.0.0
----------------------
Creating npmrcFile. Path: H:\.npmrc
Getting new credentials for source:https://########.pkgs.visualstudio.com/_packaging/########/npm/registry/, scope:vso.packaging_write vso.drop_write
>npm publish
...
npm ERR! need auth auth required for publishing
npm ERR! need auth You need to authorize this machine using `npm adduser`
我在这里错过了什么?
【问题讨论】:
-
运行 vsts-npm-auth -config .npmrc 命令时是否有提示窗口让您进行身份验证?我的步骤: 1. 单击 Connect to Feed >npm 2. 将 registry=xxx always-auth=true 复制到 .npmrc 文件 3. 运行 npm install -g vsts-npm-auth --registry https..... 4. 运行vsts-npm-auth -config .npmrc
-
我第一次运行该命令时会出现身份验证窗口。而且我已经登录没有错误。我遵循了所有这些步骤(从这里:visualstudio.com/en-us/docs/package/npm/npmrc 和这里:youtube.com/watch?v=Y3ugg3p7gTo)
-
请参阅此主题以删除相关信息并重试。 stackoverflow.com/questions/43840562/…
-
已经关注了没有解决。如果我在管理控制台中执行 vsts-npm-auth 会有一个区别: vsts-npm-auth v0.25.0.0 ---------- - 创建 npmrc 文件。路径:H:\.npmrc 找不到路径“H:\.npmrc”的一部分。
-
H:(网络驱动器)中已经有一个 .npmrc 文件,但该驱动器似乎无法从命令行访问(C:\>h: 系统找不到指定的驱动器。)如果以管理员身份运行
标签: authentication npm azure-artifacts