问题描述:
从GitHub地址下载内容,提示服务器证书验证失败,没有CRLfile。
curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

问题原因:
根本原因是计算机不信任对Gitlab服务器上使用的证书进行签名的证书颁发机构。
这并不意味着证书可疑,它可以是自签名的,也可以由不在系统的CA列表中的机构/公司签名。

curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). 
#curl默认情况下使用“捆绑包”执行SSL证书验证,证书颁发机构(CA)公共密钥(CA证书)。
If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option.
#如果默认捆绑文件不足,您可以指定备用文件使用--cacert选项。
If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL).
#如果此HTTPS服务器使用由表示为捆绑软件,证书验证可能由于证书有问题(证书可能已过期,或者名称可能与网址中的域名不匹配)。
If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.
#如果您要关闭curl对证书的验证,请使用 -k(或--insecure)选项。

解决:
关闭系统的安全认证。
能解决所有证书问题,操作简单,系统面临一定的风险。

终端输入命令

export GIT_SSL_NO_VERIFY=1

最后修改:2021 年 12 月 19 日
如果觉得我的文章对你有用,请随意赞赏