大网数据广告活动
服务器运维问答

Disable SSL check rpm

· 52CE 我爱测

When trying to run any rpm command I get the follow error. I am not sure why i am getting a curl error but i have tried many different options which have all failed. Running CentOS7 and behind a proxy [root@CentOS7]# rpm -Uvh htt…

问题原文

原帖链接 · Anthony Fornito · CC BY-SA 3.0

When trying to run any rpm command I get the follow error. I am not sure why i am getting a curl error but i have tried many different options which have all failed.

Running CentOS7 and behind a proxy

[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

So I ran a check as per a website that I think worked.

[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>

I am behind an proxy and ran the export command.

export https_proxy=https://USERNAME:[email omitted]:8080/

My question(s) are:

  1. What is the equivalent of curl -k to rpm?

  2. Is there an curl.config somewhere i can tell curl to not check for ssl certs? I have read this is a bad idea but I have tested the two repos on a different server that did not give me the error also not behind the proxy.

  3. Im not exactly sure the relationship of rpm to curl, but i am assuming because i am getting a curl error that curl is the one giving the error?

I did RTM for both rpm and curl and cannot figure out what needs to be done. I did read somewhere i need to import the keys or something but im not sure what i am suppose to be doing there either.

已采纳解答

原帖链接 · Joe Morgan · CC BY-SA 3.0

What you would need to do is:

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

If you still get an SSL warning try:

wget --no-check-certificate https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Then you can

rpm -Uvh webtatic-release.rpm

Which should show up here:

ll /etc/yum.repos.d

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-10-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。