Jenkins-2.249.2-1.1.noarch.rpm is not installed 错误

更新 CentOS 的时候提示 Jenkins 错误。

Total size: 198 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/jenkins/packages/jenkins-2.249.2-1.1.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 45f2c3d5: NOKEY


Public key for jenkins-2.249.2-1.1.noarch.rpm is not installed

解决办法

可以考虑执行下面的命令:

[[email protected] ~]# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
[[email protected] ~]# rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key

执行上面的命令后,服务器控制台的输出为:

[[email protected] ~]#  wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
--2020-10-28 12:48:31--  http://pkg.jenkins.io/redhat-stable/jenkins.repo
Resolving pkg.jenkins.io (pkg.jenkins.io)... 2a04:4e42:31::645, 199.232.38.133
Connecting to pkg.jenkins.io (pkg.jenkins.io)|2a04:4e42:31::645|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://pkg.jenkins.io/redhat-stable/jenkins.repo [following]
--2020-10-28 12:48:31--  https://pkg.jenkins.io/redhat-stable/jenkins.repo
Connecting to pkg.jenkins.io (pkg.jenkins.io)|2a04:4e42:31::645|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 85
Saving to: ‘/etc/yum.repos.d/jenkins.repo’

100%[=============================>] 85          --.-K/s   in 0s      

2020-10-28 12:48:32 (2.79 MB/s) - ‘/etc/yum.repos.d/jenkins.repo’ saved [85/85]

[[email protected] ~]# rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
[[email protected] ~]# 

然后再运行更新就不会有问题了。

你的操作系统就能够进行更新了。