0%

server certificate verification failed solution

server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none 的正确解决方法。

出现此错误时,问题出在证书的缺失,不可用如export GIT_SSL_NO_VERIFY=1方法去解除安全限制,正确方法是下载证书,

1
2
3
4
hostname=XXX
port=443
trust_cert_file_location=`curl-config --ca`
sudo bash -c "echo -n | openssl s_client -showcerts -connect $hostname:$port 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' >> $trust_cert_file_location"

若不起作用,可用IP代替真实hostname。

Welcome to my other publishing channels