git clone CA 問題

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

server certificate verification failed. CAfile: none CRLfile: none


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


$ sudo -s
# echo -n | openssl s_client -showcerts -connect -servername 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.