小编N.S*_*lwi的帖子

npm 错误!无法验证,需要:Basic Realm=“Artifactory Realm”

我尝试运行命令:

\n
npm install -g @angular/cli@9.1.0\n
Run Code Online (Sandbox Code Playgroud)\n

但我有以下错误:

\n
\n

npm 错误!代码E401
\nnpm 错误!无法验证,需要:Basic Realm=“Artifactory Realm”

\n

npm 错误!此运行的完整日志可以在以下位置找到:
\nnpm ERR!/Users/xxxx/.npm/_logs/2021-08-10T19_33_12_063Z-debug.log

\n
\n

注意:node js 和 npm 工作正常。

\n

我已按照 Artifactory 中的说明使用以下命令解决此问题:

\n
npm config set registry https://artifactory.......com/artifactory/api/npm/xxxx/\n
Run Code Online (Sandbox Code Playgroud)\n

因为我已将以下内容粘贴到 ~/.npmrc 文件中:

\n
_auth = fhgf......ghgj==\nemail = xxx@xxx.com\nalways-auth = true\n
Run Code Online (Sandbox Code Playgroud)\n

我也尝试过使用npm login,但出现以下错误并且无法\xe2\x80\x99t 继续:

\n
\n

npm 登录
\n用户名:xxx@xxx.com
\nnpm 警告名称不能包含非 url 安全字符
\n用户名:(xxx@xxx.com)
\n用户名:(xxx@xxx.com)
\n用户名:(xxx@xxx .com)
\n用户名: (xxx@xxx.com)

\n
\n

我该如何解决这个问题?

\n

artifactory npm

29
推荐指数
3
解决办法
12万
查看次数

标签 统计

artifactory ×1

npm ×1