GPG 检查在 CentOS Stream 9 上失败,但在 Fedora 35 上则不然

问题描述 投票:0回答:2

我在使用 CentOS 9 运行的实验室服务器上遇到问题,当我尝试安装 Grafana 时,GPG 检查失败。这是我得到的输出:

     Importing GPG key 0x24098CB6:
     Userid     : "Grafana <[email protected]>"
     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 <[email protected]>"
     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,所以如果这个问题之前已经解决了,我很抱歉,但我找不到它。

centos grafana fedora dnf
2个回答
2
投票

CentOS Streams 9 中的默认加密策略发生了一些变化。

update-crypto-policies --set DEFAULT:SHA1

需要使用 SHA256 或 SHA521 密钥(而不是 SHA1)对包进行重新签名。

参考:https://access.redhat.com/articles/6846411


0
投票

以防万一有人发现此线程在 Rocky / RHEL / CentOS Stream 9 上安装 Plex Media Server 时遇到同样的问题,@askb 的信息解决了我的问题。

© www.soinside.com 2019 - 2024. All rights reserved.