VOOZH about

URL: https://qiita.com/task-k/items/6cf9b17e65771fbf9205

⇱ fatal: unable to connect to github.com: の時に試すこと #Git - Qiita


👁 Image
48

Go to list of users who liked

33

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

More than 5 years have passed since last update.

@task-k

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

48
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したタイミングで書き換わってたりするのかもしれない。

参考

48

Go to list of users who liked

33
1

Go to list of comments

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
48

Go to list of users who liked

33