LoginSignup
45
33

More than 5 years have passed since last update.

fatal: unable to connect to github.com: の時に試すこと

Posted at

bowerでjsライブラリ管理してたらいつからか↓こんなが出るようになった

ターミナル
fatal: unable to connect to github.com:
github.com .................errno=Operation timed out

いつからだろう。

git://からhttps://に変更

githubに接続するときは基本"git://..........git"(gitプロトコル)で接続します。
まぁね、だってgitだもん。

でもgitプロトコルで社内から社外に接続しようとするとダメだよって言われる。
なのでhttpsで接続してしまおうってわけでgit configを書き換えます。

git config --global url."https://".insteadOf git://

--globalが付いているので、git://で接続しようとするのはすべてhttps://に変わります。
気をつけてくださいね

この設定、一番最初にしたんだけど、gitをupdateしたタイミングで書き換わってたりするのかもしれない。

参考

45
33
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
45
33