2016-09-14 43 views
0

私のプロジェクト(Windows 7マシン)にgulp 4をインストールしようとしています。私はnpm install gulpを実行すると、私はこのエラーを取得するnpmインストールエラー:ssh:ホストに接続github.comポート22:接続がタイムアウトしました

"gulp": "gulpjs/gulp#4.0" 

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のからリポジトリのクローンを作成しようとすると、それが正常に動作し、

その依存関係のために、私の package.jsonは次のように に見えます
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 

いずれも動いていないようにみえます。これをどうすれば解決できますか?

答えて

0

私は同じ問題を抱えていました。このコマンドを試して、npm installを再度実行してください。これにより、すべてのURLがhttps://で始まるように変更されます。これはうまくいくようです。

git config --global url."https://".insteadOf git:// 
関連する問題