命令:
gpg -vvv --debug-all --recv-keys A8BD96F8FD24E96B60232807B3B4C3CECC10C662
输出:
gpg: Note: no default option file '/home/user/.gnupg/gpg.conf'
gpg: using character set 'utf-8'
gpg: enabled debug flags: packet mpi crypto filter iobuf memory cache memstat trust hashing ipc clock lookup extprog
gpg: DBG: [not enabled in the source] start
gpg: DBG: chan_3 <- # Home: /home/user/.gnupg
gpg: DBG: chan_3 <- # Config: /home/user/.gnupg/dirmngr.conf
gpg: DBG: chan_3 <- OK Dirmngr 2.2.4 at your service
gpg: DBG: connection to the dirmngr established
gpg: DBG: chan_3 -> GETINFO version
gpg: DBG: chan_3 <- D 2.2.4
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KS_GET -- 0xA8BD96F8FD24E96B60232807B3B4C3CECC10C662
gpg: DBG: chan_3 <- ERR 167772339 Not enabled <Dirmngr>
gpg: keyserver receive failed: Not enabled
gpg: DBG: chan_3 -> BYE
gpg: DBG: [not enabled in the source] stop
gpg: keydb: handles=0 locks=0 parse=0 get=0
gpg: build=0 update=0 insert=0 delete=0
gpg: reset=0 found=0 not=0 cache=0 not=0
gpg: kid_not_found_cache: count=0 peak=0 flushes=0
gpg: sig_cache: total=0 cached=0 good=0 bad=0
gpg: random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
outmix=0 getlvl1=0/0 getlvl2=0/0
gpg: rndjent stat: collector=0x0000000000000000 calls=0 bytes=0
gpg: secmem usage: 0/65536 bytes in 0 blocks
答案1
我也为此苦苦挣扎了很长一段时间。然后我在手册中找到了dirmngr
:
--standard-resolver
This option forces the use of the system's standard DNS resolver
code. This is mainly used for debugging. Note that on Windows
a standard resolver is not used and all DNS access will return
the error ``Not Implemented'' if this option is used. Using
this together with enabled Tor mode returns the error ``Not
Enabled''.
所以文件中可能有~/.gnupg/dirmngr.conf
一行带有standard-resolver
.如果有,请尝试将其删除。dirmngr
每次更改此文件后还要终止该进程。
这对我来说不起作用,因为 dirmngr 对 DNS 解析做了一些奇怪的事情,而这些事情只适用于 Linux。
下一步要尝试的是尝试将选项更改为recursive-resolver
。
这对我来说也不起作用,它给了我类似的错误ERR 167772360 Buffer too short <Dirmngr>
。
作为最后的尝试,我添加了选项no-use-tor
a 的开始dirmngr.conf
,这最终对我有用。
后来发现端口 9050 上的 ssh“DynamicForwarding”选项使 dirmngr 误认为 Tor 正在使用中。