GPG 错误,不存在 NO_PUBKEY id

GPG 错误,不存在 NO_PUBKEY id

我在 ubuntu 22.04 上遇到一个常见问题:apt-get update由于缺少签名而无法成功执行:

正在读取软件包列表...完成
W:GPG 错误:https://dl.k6.io/debstable InRelease:由于公钥不可用,无法验证以下签名:NO_PUBKEY C780D0BDB1A69C86 E:存储库“https://dl.k6.io/deb stable InRelease”未签名。

我的问题是,引用的键在我的计算机上不存在。输出apt-key list

--------------------
pub   rsa4096 2012-05-11 [SC]
      790B C727 7767 219C 42C8  6F93 3B4F E6AC C0B2 1F32
uid           [ unknown] Ubuntu Archive Automatic Signing Key (2012) <[email protected]>

pub   rsa4096 2021-03-12 [SC]
      C5AD 17C7 47E3 415A 3642  D57D 77C6 C491 D6AC 1D69
uid           [ unknown] k6.io (key for signing binaries) <[email protected]>
sub   rsa4096 2021-03-12 [S] [expires: 2023-03-12]
sub   rsa4096 2021-03-12 [E]

/etc/apt/trusted.gpg.d/deadsnakes-ubuntu-ppa.gpg
------------------------------------------------
pub   rsa4096 2017-07-29 [SC]
      F23C 5A6C F475 9775 95C8  9F51 BA69 3236 6A75 5776
uid           [ unknown] Launchpad PPA for deadsnakes

/etc/apt/trusted.gpg.d/microsoft.gpg
------------------------------------
pub   rsa2048 2015-10-28 [SC]
      BC52 8686 B50D 79E3 39D3  721C EB3E 94AD BE12 29CF
uid           [ unknown] Microsoft (Release signing) <[email protected]>

/etc/apt/trusted.gpg.d/microsoft-prod.gpg
-----------------------------------------
pub   rsa2048 2015-10-28 [SC]
      BC52 8686 B50D 79E3 39D3  721C EB3E 94AD BE12 29CF
uid           [ unknown] Microsoft (Release signing) <[email protected]>

/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg
------------------------------------------------------
pub   rsa4096 2012-05-11 [SC]
      8439 38DF 228D 22F7 B374  2BC0 D94A A3F0 EFE2 1092
uid           [ unknown] Ubuntu CD Image Automatic Signing Key (2012) <[email protected]>

/etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg
------------------------------------------------------
pub   rsa4096 2018-09-17 [SC]
      F6EC B376 2474 EDA9 D21B  7022 8719 20D1 991B C93C
uid           [ unknown] Ubuntu Archive Automatic Signing Key (2018) <[email protected]>

我已经尝试执行:sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C780D0BDB1A69C86但令人惊讶的是,它签署了不同的密钥并且没有效果,问题仍然存在:

Executing: /tmp/apt-key-gpghome.4bZH9jxkOQ/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys C780D0BDB1A69C86
gpg: key 77C6C491D6AC1D69: "k6.io (key for signing binaries) <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

我只想消除这个错误,我的机器上甚至没有安装 k6。我搜索到的每个来源都通过重现上述步骤修复了错误...

答案1

我最终删除了 k6 的源列表来解决这个问题:

sudo rm /etc/apt/sources.list.d/k6.list
sudo rm /etc/apt/sources.list.d/k6.list.save

相关内容