Git,cygwin,httpsでgithubに接続する

とエラーが出るのでどうにかした。

現象

$ g submodule add https://github.com/hogehoge/fugafuga
Cloning into fugafuga...
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/hogehoge/fugafuga.git/info/refs

fatal: HTTP request failed
Clone of 'https://github.com/hogehoge/fugafuga.git' into submodule path 'fugafuga' failed

原因

証明書が入ってない。wgetとかでもhttpsの取得むり

対策

https経由でgitリポジトリにアクセスするときは証明書のチェックしないように設定する

$ git config --global http.sslVerify false

ちなみにwgetの場合は--no-check-certificateオプションで証明書無視できるらしいですよ。

もっとマシな対策したかったんですがcygwinに証明書入れる簡単な方法が分からず。