brewパッケージを更新するためにbrew update
をすると何故かこける
1 2 3 4 | brew update fatal: unable to access 'https://github.com/Homebrew/homebrew.git/': Failed connect to github.com:443; Operation timed out Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master |
調べていくと、どうやらgit clone
でhttps指定の時に必ずこけてる模様
1 2 3 4 5 | git clone https://github.com/cakephp/cakephp.git Cloning into 'cakephp'... error: RPC failed; result=7, HTTP code = 0 fatal: The remote end hung up unexpectedly |
結論
次の2点を両方実施することで解決しました。
- ~/.netrcを記述する
- ~/.gitconfigのhttp.sslVerifyをfalseにする
~/.netrcを記述する
1 2 | vim ~/.netrc |
1 2 3 4 | machine github.com login ログインID(メールアドレス) password パスワード |
~/.gitconfigのhttp.sslVerifyをfalseにする
1 2 | git config --global http.sslVerify false |
念のため確認
1 2 | cat ~/.gitconfig | grep ssl |
sslVerify = false
が表示されればOK