簡體   English   中英

無法在 rhel8 中使用 yum 更新 jenkins

[英]Unable to update jenkins using yum in rhel8

我已經按照他們的文檔安裝了 jenkins。 然后當我嘗試更新 jenkins 時,它給出了這些奇怪的錯誤。 端口 443 和 80 已打開。 可以在這個問題上提供任何幫助。

日志:

[root@server ~]# cat /etc/yum.repos.d/jenkins.repo
[jenkins]
name=Jenkins-stable
baseurl=http://pkg.jenkins.io/redhat-stable
gpgcheck=1 
[root@server ~]# cat /etc/yum.conf                                                                                           
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
skip_if_unavailable=False
ip_resolve=4
[root@mcdefrapl008 ~]#
[root@server ~]# yum update                                                                                                
Jenkins-stable                                                                                     0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'jenkins':
  - Curl error (56): Failure when receiving data from the peer for http://pkg.jenkins.io/redhat-stable/repodata/repomd.xml [Recv fa
ilure: Connection reset by peer]
Error: Failed to download metadata for repo 'jenkins': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors
 were tried
[root@server ~]# curl http://pkg.jenkins.io/redhat-stable/repodata/repomd.xml -v
*   Trying 151.101.2.133...
* TCP_NODELAY set
* Connected to pkg.jenkins.io (151.101.2.133) port 80 (#0)
> GET /redhat-stable/repodata/repomd.xml HTTP/1.1
> Host: pkg.jenkins.io
> User-Agent: curl/7.61.1
> Accept: */*
> 
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
[root@mcdefrapl008 ~]#

順便提一下,當我在瀏覽器中打開 url 時,它會重定向到 https。

yum不會自動重定向到https 所以在你的 repo https中設置並重試。

[jenkins]
name=Jenkins-stable
baseurl=https://pkg.jenkins.io/redhat-stable
gpgcheck=1 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM