无法更新 apt/gpg 过期密钥

无法更新 apt/gpg 过期密钥

我有一个过期的密钥,正在尝试更新:

$ LANG=C apt-key list | grep expired
pub   2048R/8719FCE4 2016-09-28 [expired: 2018-12-07]
$ sudo apt-key del 8719FCE4
OK
$ LANG=C apt-key list | grep expired
$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 8719FCE4
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.89FHZwuz0m --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring ...
 --recv-keys --keyserver keyserver.ubuntu.com 8719FCE4
gpg: requesting key 8719FCE4 from hkp server keyserver.ubuntu.com
gpg: key 8719FCE4: public key "home:stevenpusser OBS Project <home:[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
$ sudo apt-get update 
Ign http://ppa.launchpad.net trusty InRelease
...
W: GPG error: http://download.opensuse.org  Release: The following signatures were invalid: KEYEXPIRED 1544201334
W: Failed to fetch http://build.openvpn.net/debian/openvpn/stable/dists/trusty/main/binary-i386/Packages  403  Forbidden [IP: 146.112.61.106 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.
$ LANG=C apt-key list | grep expired
pub   2048R/8719FCE4 2016-09-28 [expired: 2018-12-07]

8719FCE4我刚刚重新下载的这个密钥keyserver.ubuntu.com似乎已经过期了。

我怎样才能解决这个问题 ?

答案1

在学习了如何使用 GnuPG 之后,似乎这个8719FCE4密钥自过期以来就没有更新过,keyserver.ubuntu.com因此唯一的解决方案就是等待密钥更新:

$ gpg --batch --search-keys --keyserver keyserver.ubuntu.com 8719FCE4
gpg: searching for "8719FCE4" from hkp server keyserver.ubuntu.com
q(1)    home:stevenpusser OBS Project <home:[email protected]>
      2048 bit RSA key 8719FCE4, created: 2016-09-28, expires: 2018-12-07 (expired)
Keys 1-1 of 1 for "8719FCE4".  gpg: Sorry, we are in batchmode - can't get input

相关内容