尝试运行任何 rpm 命令时,出现以下错误。我不确定为什么会出现 curl 错误,但我尝试了许多不同的选项,但都失败了。
运行 CentOS7 并在代理后面
[root@CentOS7]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
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.
error: skipping https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm - transfer failed
所以我根据我认为有效的网站进行了检查。
[root@CentOS7]# curl -k https://google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="https://www.google.com/">here</A>.
</BODY></HTML>
我在代理后面并运行了导出命令。
export https_proxy=https://USERNAME:[email protected]:8080/
我的问题是:
curl -k 相当于什么 rpm?
是否有 curl.config 我可以告诉 curl 不检查 ssl 证书的地方?我读过这是一个坏主意,但我已经在不同的服务器上测试了两个存储库,它没有给我错误,也没有在代理后面。
我不确定 rpm 与 curl 的关系,但我假设因为我收到 curl 错误,所以 curl 是给出错误的那个?
我对 rpm 和 curl 都进行了 RTM,但无法弄清楚需要做什么。我确实在某个地方读过我需要导入密钥或其他东西,但我也不确定我应该在那里做什么。
你需要做的是:
如果您仍然收到 SSL 警告,请尝试:
那么你也能
应该显示在这里: