我有一個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