curl: (60) Peer's certificate issuer 已被标记为不被用户信任

标签 curl ssl

curl -L https://get.rvm.io | bash -s stable --ruby

当我尝试这个时,我得到了这个,我认为我的 openssl 坏了,

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (60) Peer's certificate issuer has been marked as not trusted by the user.
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.

我使用 -k ,但它总是出错, 我是这样走的https://serverfault.com/questions/437546/centos-openldap-cert-trust-issues 但是又报错了,如何解决?

最佳答案

我这里是CentOS7 pyspider,运行pyspider显示错误

异常 HTTP 599 Peer 的证书颁发者已被标记为用户不信任

并使用以下步骤修复它:

pip3 uninstall pycurl
export PYCURL_SSL_LIBRARY=nss
export LDFLAGS=-L/usr/local/opt/openssl/lib;export CPPFLAGS=-I/usr/local/opt/openssl/include;pip install pycurl --compile --no-cache-dir

详细说明

关于curl: (60) Peer's certificate issuer 已被标记为不被用户信任,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19377273/

相关文章:

php - 为什么 cURL 有时需要 URL 的 "www."部分才能工作,反之亦然?

c++ - libcurl + openssl 无法下载大于 2GB 的文件

curl - 通过 curl POST 将参数传递给 jenkins 作业不起作用?

shell - 将双引号中的命令行参数传递给 curl

c# - 忽略无效的 SSL 证书 Windows 10

java - Tomcat-to-tomcat 连接给出 SSLHandshakeException,而 JavaApp-to-Tomcat 工作正常

c++ - 使用 openssl 封装数据包

php - 使用 CURL 保存图像,有时会保存空白图像

ssl - Erlang ssl : password option for private key

apache - 带有大量 POST 上传和我的 apache + varnish + plone 设置的错误网关