CURL请求证书错误:curl: (60) Peer's Certificate issuer is not recognized

证书错误

当请求某个网址的时候出现如下所示的证书错误

[root@clink-z1-monitor1 ~]# curl -H "Authorization: Bearer TOKEN值" https://IP地址:端口/api/dashboards/home

curl: (60) Peer's Certificate issuer is not recognized.

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

扫描二维码关注公众号,回复: 6050956 查看本文章

 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.

解决办法:

1、下载网址所对应的2级证书(倒数第二级

用记事本打开文件

复制其中的内容

将所复制的内容追加到

/etc/pki/tls/certs/ca-bundle.crt文件之中

猜你喜欢

转载自blog.csdn.net/weixin_40006394/article/details/84790775
今日推荐