我有一个linux框在无身份验证代理之后。无法安装grunt-cli,但可以安装凉亭
我已经配置git使用https而不是git。
url.https://.insteadof=git://
我已经设置了我的http_proxy和https_proxy环境变量以及npm代理。
; cli configs
user-agent = "npm/3.8.6 node/v6.0.0 linux x64"
; userconfig /jenkins/.npmrc
https-proxy = "{host}:8060"
proxy = "{host}:8060"
我可以安装凉亭:
npm install -g bower
但是当我尝试
npm install -g grunt-cli
我得到:
npm ERR! fetch failed https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz
npm WARN retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=connect EINVAL 0.0.31.124:80 - Local (0.0.0.0:0)
....
npm ERR! network tunneling socket could not be established, cause=connect EINVAL 0.0.31.124:80 - Local (0.0.0.0:0)
我与故宫版本 3.8试过。 6/2.15.1
任何想法,为什么我可以在同一个会话中安装bower而不是grunt-cli(我甚至可以安装grunt,克隆grunt-cli)?
最新通报
1:我能够做到
curl -O https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz
成功,故宫HTTPS代理等于$ https_proxy值。
我有同样的问题,它帮助了我,谢谢。我想你可以选择你自己的答案作为最佳答案:) – Nicomak