相关疑难解决方法(0)

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万
查看次数

npm令牌列表给出错误

我刚刚使用以下命令升级了npm:

npm install npm@latest -g

当我做npm token list现在,我收到以下错误:

npm ERR!代码EAUTHIP

npm ERR!无法验证,需要:基本,承载

npm ERR!可以在以下位置找到此运行的完整日志:

npm ERR!/Users/USerName/.npm/_logs/2018-03-28T16_31_29_299Z-debug.log

以下是上述日志文件的内容:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/6.8.1/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'token',
1 verbose cli   'list' ]
2 info using npm@5.8.0
3 info using node@v6.8.1
4 info token getting list
5 http request ? GET https://registry.npmjs.org/-/npm/v1/tokens
6 http 401 ? Unauthorized (https://registry.npmjs.org/-/npm/v1/tokens)
7 verbose stack Error: Unable to authenticate, need: Basic, …
Run Code Online (Sandbox Code Playgroud)

node.js npm

6
推荐指数
1
解决办法
3484
查看次数

标签 统计

npm ×2

artifactory ×1

node.js ×1