【问题标题】:How can I get bower install working behind proxy?我怎样才能让凉亭安装在代理后面工作?
【发布时间】:2015-10-02 06:02:48
【问题描述】:

我已经设置了(我认为)windows 和 npm 的所有代理设置。但是凉亭没有,这是我得到的错误:

  download https://github.com/jquery/jquery/archive/2.1.4.tar.gz
     retry Download of https://github.com/jquery/jquery/archive/2.1.4.tar.gz failed with ECONNRESET, retrying in 1.7s
     retry Download of https://github.com/jquery/jquery/archive/2.1.4.tar.gz failed with ECONNRESET, retrying in 2.2s
    Error: EPERM: operation not permitted, unlink...

取消链接后显示的文件甚至不存在。

鲍尔版本:1.5.3 节点版本:4.1.1 操作系统:Windows_NT 6.1.7601 x64。

我怎样才能避免这个错误?

【问题讨论】:

    标签: npm bower


    【解决方案1】:

    看看这里:https://github.com/bower/spec/blob/master/config.md#https-proxy

    在您的.bowerrc 中,您可以添加以下属性:

    "proxy":"http://<host>:<port>",
    "https-proxy":"http://<host>:<port>"
    

    这里还有一个示例,其中包括代理的用户和密码身份验证(如果是这样的话):

    "proxy":"http://<user>:<password>@<host>:<port>",
    "https-proxy":"http://<user>:<password>@<host>:<port>"
    

    另外,看看 Stack 上的这个问题: bower proxy configuration

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-03-09
      • 1970-01-01
      • 2021-06-06
      • 2021-01-22
      • 2011-04-26
      • 1970-01-01
      • 1970-01-01
      • 2013-07-22
      相关资源
      最近更新 更多