git clone CA 問題

在 clone 自己架設的 git server 遇到 CA 無法驗證

server certificate verification failed. CAfile: none CRLfile: none

可以用下面方式跳過:

$ export GIT_SSL_NO_VERIFY=1
or
$ git config –global http.sslverify false

或是把憑證加入信任

$ sudo -s
# echo -n | openssl s_client -showcerts -connect liho.tw:443 -servername liho.tw 2>/dev/null | sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p’ >> /etc/ssl/certs/liho.pem

這樣就不用忽略 ssl 驗證了

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.