gpg:通过 WKD 检索“me@example.com”时出错

meh*_*dix 16 gpg

我正在尝试在本地加密文件,但出现错误。me@example.com是我的电子邮件地址的占位符,我的密钥环和密钥服务器上都存在公钥。我的私钥位于硬件密钥 (Yubikey) 上。我可以毫无问题地解密以前加密的文件。这是错误:

?  ~ gpg -e -r me@example.com somefile.txt 
gpg: error retrieving 'me@example.com' via WKD: General error
gpg: me@example.com: skipped: General error
gpg: somefile.txt encryption failed: General error
Run Code Online (Sandbox Code Playgroud)

这个错误是什么意思,我该如何解决?

PS 只有一件事可能相关。我的公钥已过期。

meh*_*dix 16

延长密钥到期日期解决了这个问题。错误消息具有误导性。但是,-vv按照 Jens Erat 的建议添加会产生一些有用的错误消息,例如gpg: Note: signature key ... expiredgpg: ... skipped: Unusable public key有助于找到实际错误。

  • 对于我明年的未来:为了延长到期日期,停止谷歌搜索并直接前往 Arch Linux 维基页面:https://wiki.archlinux.org/index.php/GnuPG#Extending_expiration_date。 (4认同)