0
我想在我的項目(Windows 7機器)安裝gulp 4。 對於依賴,我package.json
樣子:npm安裝錯誤:ssh:連接到主機github.com端口22:連接超時
"gulp": "gulpjs/gulp#4.0"
當我運行npm install gulp
我得到這個錯誤:
npm ERR! ssh: connect to host github.com port 22: Connection timed out
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm verb exit [ 1, true ]
但是當我嘗試克隆一個倉庫從GitHub它工作正常,
git clone https://github.com/gulpjs/gulp.git
我在企業防火牆後面運行這些命令。因此,我的代理設置在我的環境變量中。
http_proxy : http://proxy.company.com:port
https_proxy : https://proxy.company.com:port
我也試着設置:
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
我試圖在環境變量一樣好。
我也試過:
npm config set proxy http://login:[email protected]:port
npm config set https-proxy http://login:[email protected]:port
以上都不似乎工作。我怎樣才能解決這個問題?