虽然该--keyserver
选项确实已弃用于最新版本的GnuPG,但您仍然可以使用它。您遇到的问题是另一个问题:您必须指定要使用的协议。
来自man gpg
:
--keyserver name
This option is deprecated - please use the --keyserver in ‘dirmngr.conf’
instead.
Use name as your keyserver. This is the server that --recv-keys,
--send-keys, and --search-keys will communicate with to receive keys from,
send keys to, and search for keys on. The format of the name is a URI:
`scheme:[//]keyservername[:port]' The scheme is the type of keyserver:
"hkp" for the HTTP (or compatible) keyservers, "ldap" for LDAP keyservers,
or "mailto" for the Graff email keyserver.
尤其是观察scheme:
是不可选的。
gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys DECAFBAD
而是使用它来提供密钥服务器的临时更改。