curl:出现SSL错误提示

本文记录了在升级Ruby版本过程中遇到的错误,包括错误代码和详细的错误信息。针对这些错误,文章提供了可能的原因分析及解决方案,例如通过更改主机时间来避免证书验证失败的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在上一篇博文中,升级ruby版本中,提示如下错误:

1) Error fetching https://mirrors.aliyun.com/rubygems/:

1 [root@web ~]# gem sources -a https://mirrors.aliyun.com/rubygems/
2 Error fetching https://mirrors.aliyun.com/rubygems/:
3         SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://mirrors.aliyun.com/rubygems/specs.4.8.gz)

2)curl: (60) Peer certificate cannot be authenticated with known CA certificates

 1 [root@web ~]# \curl -sSL https://get.rvm.io | bash -s stable
 2 curl: (60) Peer certificate cannot be authenticated with known CA certificates
 3 More details here: http://curl.haxx.se/docs/sslcerts.html
 4 
 5 curl performs SSL certificate verification by default, using a "bundle"
 6  of Certificate Authority (CA) public keys (CA certs). If the default
 7  bundle file isn't adequate, you can specify an alternate file
 8  using the --cacert option.
 9 If this HTTPS server uses a certificate signed by a CA represented in
10  the bundle, the certificate verification probably failed due to a
11  problem with the certificate (it might be expired, or the name might
12  not match the domain name in the URL).
13 If you'd like to turn off curl's verification of the certificate, use
14  the -k (or --insecure) option.

上述错误是主机时间不对。更改过主机时间后,可避免上述错误。

转载于:https://www.cnblogs.com/eeexu123/p/9228710.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值