尝试运行任何 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,但不知道需要做什么。我确实在某处读到我需要导入密钥或其他东西,但我也不确定我应该在那里做什么。
答案1
你需要做的是:
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
如果仍然收到 SSL 警告,请尝试:
wget --no-check-certificate https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
然后你可以
rpm -Uvh webtatic-release.rpm
应该显示在这里:
ll /etc/yum.repos.d