2017-04-10 9 views
2

npm updateを実行すると、bowerとnpmの両方で問題が発生しています。npmとbowerのアップデートは、ネットワークによっては大部分の時間が失敗する

jrquick$ npm update 
npm ERR! git fetch -a origin (ssh://[email protected]/[PRIVATE_PROJECT]/[PRIVATE_REPOSITORY].git) ssh_exchange_identification: read: Connection reset by peer 
npm ERR! git fetch -a origin (ssh://[email protected]/[PRIVATE_PROJECT]/[PRIVATE_REPOSITORY].git) fatal: Could not read from remote repository. 
npm ERR! git fetch -a origin (ssh://[email protected]/[PRIVATE_PROJECT]/[PRIVATE_REPOSITORY].git) 
npm ERR! git fetch -a origin (ssh://[email protected]/[PRIVATE_PROJECT]/[PRIVATE_REPOSITORY].git) Please make sure you have the correct access rights 
npm ERR! git fetch -a origin (ssh://[email protected]/[PRIVATE_PROJECT]/[PRIVATE_REPOSITORY].git) and the repository exists. 
npm ERR! Darwin 15.6.0 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "update" 
npm ERR! node v6.3.0 
npm ERR! npm v3.10.8 
npm ERR! code 128 

npm ERR! Command failed: git fetch -a origin 
npm ERR! ssh_exchange_identification: read: Connection reset by peer 
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 ERR! Please include the following file with any support request: 
npm ERR!  /Users/jrquick/[PRIVATE_PROJECT]/[PRIVATE_REPOSITORY]/npm-debug.log 

私の仕事のネットワーク接続から実行すると、このエラーで大部分が失敗します。しかし、私はスターバックスやアパートに行き、同じコマンドをうまく動かすことができます。

これを修正する方法についてのご意見はありますか?私はネットワーク上の制御がありませんが、これを避けるためにgitまたはnpm内でパケットサイズや設定を変更している可能性があります。

ありがとうございました。

+0

credential helperによってキャッシュされ、自動的にユーザーの資格情報を使用して)の代わりにsshのHTTPSを使用した場合

別の回避策は見ることでしょうか? –

+0

いいえ、gitコマンドに問題はありません。クローン、プルなど、それは私のオフィスでのみ起こる、より多くのnpmの依存関係は、より起こりそうな可能性よりも言った。これは、ネットワークがおそらくパケットやタイムアウトを失っていると思います。しかし私が言ったように、私の家のネットワークで働く。 – jrquick

+0

あなたの職場には多くの人々が 'npm update'をしていますか?もしそうなら、あなたは絞られる可能性があります。このエラーはbitbucketリポジトリでのみ発生することに気付きましたか? –

答えて

1

これはスロットルの問題である場合は、John D.によってmentionedとして、理論的な解決策は、(「GitLab, NPM, and SSHd MaxStartups」で述べたように)サーバーのsshd設定のMaxStartups価値を高めることであろう。

これはbitbucket.orgなので、その設定にはアクセスできません。問題が解決しない場合、それはビットバケットは、あなたの仕事のIPアドレスをブロックしている可能性があり

git config --global url."https://bitbucket.org/".insteadOf [email protected]: 
+0

これはほとんどの部分で機能していたようです。私は 'git config --global url。" https://bitbucket.org/ ".insteadOf ssh:// git @ bitbucket.org /'(わずかな違い)を使い、 'git credential-osxkeychain'で自分の資格情報を設定しました。 'git config --global credential.helper osxkeychain'を実行します。ありがとうございました! – jrquick

関連する問題