GPG检查在CentOS Stream 9上失败,但在Fedora 35上没有失败

pw9qyyiw  于 2022-11-07  发布在  其他
关注(0)|答案(1)|浏览(404)

我使用CentOS 9运行的实验室服务器出现问题,当我尝试安装Grafana时,GPG检查失败。

Importing GPG key 0x24098CB6:
     Userid     : "Grafana <info@grafana.com>"
     Fingerprint: 4E40 DDF6 D76E 284A 4A67 80E4 8C8C 34C5 2409 8CB6
     From       : https://packages.grafana.com/gpg.key
    Is this ok [y/N]: y
    Key import failed (code 2). Failing package is: grafana-8.5.5-1.x86_64
     GPG Keys are configured as: https://packages.grafana.com/gpg.key
    The downloaded packages were saved in cache until the next successful transaction.
    You can remove cached packages by executing 'dnf clean packages'.
    Error: GPG check FAILED

当我在本地的Fedora 35机器上尝试同样的方法时,我得到了这样的结果:

Importing GPG key 0x24098CB6:
     Userid     : "Grafana <info@grafana.com>"
     Fingerprint: 4E40 DDF6 D76E 284A 4A67 80E4 8C8C 34C5 2409 8CB6
     From       : https://packages.grafana.com/gpg.key
    Is this ok [y/N]: y
    Key imported successfully
    Running transaction check

下载的软件包是相同的grafana-8.5.5-1.x86_64.rpm,我在两个安装中都使用了dnf,并且grafana.repo文件也是相同的:

[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt

我知道我可以直接关闭GPG检查,但我对这样的解决方案感到不舒服。
任何帮助解决这个问题将不胜感激!让我知道如果我应该提供任何更多的信息。
我最近换到了CentOS和Fedora,所以如果这个问题以前已经解决了,我很抱歉,但是我找不到它。

xdnvmnnf

xdnvmnnf1#

CentOS流9中的默认加密策略有一些更改。
update-crypto-policies --set DEFAULT:SHA1
需要使用SHA256或SHA521密钥(而不是SHA1)对软件包进行重新签名。
参考编号:https://access.redhat.com/articles/6846411

相关问题