LoginSignup
51
46

More than 5 years have passed since last update.

git clone 時に SSL証明書エラー が出た時の対処方 ~SSL certificate problem: Invalid certificate chain~

Posted at

Git リモーtpリポジトリを独自サーバで作成していたものを、
GitHubに移行しようとした際に、SSL証明書のエラーが出てしまい、移行できなくなってしまっていたので、同様の状況が起きた時に、慌てないために備忘録を残して起きます。

具体的な方法は、下記になりますが、先に結論を言うと

SSL認証をfalseにすることで回避できる

結果だけを見るとすごい単純なことですが、知らずにエラーが発生すると、地味に調査に時間が掛かった。。。( ;∀;)

Git の SSL証明書エラーが出た時の回避方法

具体的な方法としては、

$ git config --global http.sslVerify false

とコマンドを実行する

もしくは、 .gitconfig に、

[http]
   sslVerify = false

を追加を行うことで、SSL証明をoffにできるようになる。

※ コマンドで実行しても、.gitconfig に sslVerify = false が追加されるのでどちらでも同じ結果となります。

51
46
0

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
51
46