【问题标题】:npm 407 Proxy Authentication Required - GET https://registry.npmjs.org/{package}需要 npm 407 代理身份验证 - 获取 https://registry.npmjs.org/{package}
【发布时间】:2021-09-21 09:03:01
【问题描述】:

我已经尝试过all these answers,但它们都不起作用。

我也在.gitconfig 文件中配置了代理,但这是可行的,并且在 npm 中,当我尝试安装或发布包时,我收到错误;

407 Proxy Authentication Required - GET https://registry.npmjs.org/mocha

407 Proxy Authentication Required - PUT https://registry.npmjs.org/my-packaje

.npmrc 文件

proxy=http://user:password@proxy:8080/

【问题讨论】:

  • 您是否尝试将https-proxy=http://user:password@proxy:8080/ 也添加到.npmrc
  • 另外,编辑后请关闭当前终端会话并打开一个新的,因为新设置可能在已经运行的终端会话中不可用。
  • @MilanTenk 我都试过了,但对我不起作用
  • 另一种方法是使用一个工具来处理代理身份验证。例如提琴手。

标签: node.js npm npm-install


【解决方案1】:

无需用户名和密码即可使用:

proxy=http://proxy:8080/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多