禁用SSL检查rpm

当试图运行任何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/ 

我的问题是:

  1. 什么是curl -k到rpm的等价物?

  2. 有没有一个curl.config的地方,我可以告诉curl不检查SSL证书? 我已经读了这是一个坏主意,但我已经testing了两个不同的服务器上的回购,不给我错误也不在代理后面。

  3. 我不完全确定的旋转curl的关系,但我假设,因为我得到一个curl错误,curl是一个给错误?

我为rpm和curl都做了RTM,并且不知道需要做什么。 我确实读过某处我需要导入密钥或东西,但即时通讯不知道我想在那里做什么。

你需要做的是:

 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