gpg:密钥服务器接收失败:服务器指示出现故障

gpg:密钥服务器接收失败:服务器指示出现故障

我想添加一个新的存储库,但一开始就出现错误:

$ gpg --verbose --keyserver keys.gnupg.net --recv 886DDD89
gpg: keyserver receive failed: Server indicated a failure

我也尝试添加hkp://:80。但没有用:

$ gpg --keyserver hkp://keys.gnupg.net:80 --recv 886DDD89
gpg: keyserver receive failed: Server indicated a failure

还将 resolv.conf 中的 DNS 更改为:

nameserver 8.8.8.8 # Google dns

出现了同样的错误。我尝试使用该--verbose选项。但没有新的调试信息。

答案1

我没有完整的解释,但可以在 Ubuntu 21 上这样说:

前:

gpg: keyserver receive failed: Server indicated a failure

看到涉及了 dirmngr,我就以 root 身份启动了 dirmngr,然后它做了一些事情

# dirmngr
dirmngr[2410562]: No ldapserver file at: '/root/.gnupg/dirmngr_ldapservers.conf'
dirmngr[2410562.0]: permanently loaded certificates: 129
dirmngr[2410562.0]:     runtime cached certificates: 0
dirmngr[2410562.0]:            trusted certificates: 129 (128,0,0,1)
dirmngr[2410562.0]: failed to open cache dir file '/root/.gnupg/crls.d/DIR.txt': No such file or directory
dirmngr[2410562.0]: creating directory '/root/.gnupg'
dirmngr[2410562.0]: creating directory '/root/.gnupg/crls.d'
dirmngr[2410562.0]: new cache dir file '/root/.gnupg/crls.d/DIR.txt' created
# Home: /root/.gnupg
# Config: [none]
OK Dirmngr 2.2.19 at your service
^C

后:

apt-key adv --verbose --keyserver keyserver.ubuntu.com --recv-keys E6A233DBE3AFBEFC
Executing: /tmp/apt-key-gpghome.DKSIEGHESTIAa/gpg.1.sh --verbose --keyserver keyserver.ubuntu.com --recv-keys E6A233DBE3AFBEFC
gpg: no running Dirmngr - starting '/usr/bin/dirmngr'
gpg: waiting for the dirmngr to come up ... (5s)
gpg: connection to dirmngr established
gpg: data source: http://162.213.33.8:11371
gpg: armor header: Comment: Hostname:
gpg: armor header: Version: Hockeypuck ~unreleased
gpg: pub  dsa1024/E6A233DBE3AFBEFC 2011-04-08  Björn Kautler <[email protected]>
gpg: key E6A233DBE3AFBEFC: public key "Björn Kautler <[email protected]>" imported
gpg: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg: waiting for the agent to come up ... (5s)
gpg: connection to agent established
gpg: Total number processed: 1
gpg:               imported: 1

为 dirmngr 创建默认证书和目录是否有帮助?此致,xgiannak

答案2

这里你可以找到对我真正有用的答案。简而言之,更改密钥服务器,因为旧的密钥服务器不再存在:

$ gpg --verbose --keyserver keys.openpgp.org --recv 886DDD89

请注意密钥.openpgp.org是不同的

相关内容