1、Linux 服务器访问https 提示不安全
[root@-nx-data_processing_01_airflow ~]# curl https://gitlab.china.com/
curl: (60) Peer certificate cannot be authenticated with known CA certificates
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
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).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
yum install -y ca-certificates
要更新本地服务器的 CA 证书,具体步骤如下,取决于你的 Linux 发行版:
/etc/ssl/certs
目录,并运行相应的更新命令。完成后,可以通过以下命令验证 CA 是否更新成功:
curl -v https://your-domain.com
如果仍有问题,检查系统日志和证书链以获取更多信息。