我使用的是ubuntu服务器20.04。我正在尝试从密钥服务器下载开发人员公共gpg/pgp密钥。对于我想要的许多密钥,它们似乎没有被列在ubuntu的默认密钥服务器上。那些列出的,似乎不准确,或其他似乎过时或过期。我想要做的是,当尝试在ubuntu上下载公钥时,使ubuntu默认先从最严格(电子邮件要求明智的)密钥服务器(https://keys.openpgp.org/)查找所请求的密钥,然后,如果找不到,则自动从更宽松和更可压缩的密钥服务器(hkp:// look .sks-keyservers.net)查找密钥。
我遇到的第一个问题是,在执行键查找/下载时,ubuntu存储其默认的永久密钥服务器地址的终端中找不到任何设置。所以,我的问题是:
谢谢你的帮助!
发布于 2021-08-19 19:43:30
默认的ubuntu设置位于何处(我可以修改哪些文件以永久更改ubuntu中的默认密钥服务器?)
默认情况下,这是在~/.gnupg/gpg.conf
中。如果您没有这个文件/目录,您可以调用gpg --version
,以查看将GPG副本设置为存储其配置的位置。
我如何设置2个密钥服务器(在ubuntu中),它们的顺序是它们对ubuntu请求的偏好?使得keyserver1=https://keys.openpgp.org/和keyserver2 2=hkp://ple.sks-keyservers.net,这样如果在keyserver1上找不到密钥,那么ubuntu就在keyserver2上搜索密钥吗?
在包含作为注释的说明的配置文件中,您将发现以下内容:
> # GnuPG can automatically locate and retrieve keys as needed using the
> # auto-key-locate option. This happens when encrypting to an email
> # address (in the "user@example.com" form), and there are no
> # user@example.com keys on the local keyring. This option takes the
> # following arguments, in the order they are to be tried:
> #
> # cert = locate a key using DNS CERT, as specified in RFC-4398.
> # GnuPG can handle both the PGP (key) and IPGP (URL + fingerprint)
> # CERT methods.
> #
> # pka = locate a key using DNS PKA.
> #
> # ldap = locate a key using the PGP Universal method of checking
> # "ldap://keys.(thedomain)". For example, encrypting to
> # user@example.com will check ldap://keys.example.com.
> #
> # keyserver = locate a key using whatever keyserver is defined using
> # the keyserver option.
> #
> # You may also list arbitrary keyservers here by URL.
相关部分是第五行:“按审判顺序排列”。
发布于 2021-10-20 03:31:14
不幸的是,我在任何地方都找不到我的gpg.conf文件。因此,为了获得一个强化的gpg配置文件,我从gpg.conf博士的github页面下载了一个强化的github.com/drduh/config/blob/master/gpg.conf文件
然后,我对其进行了修改,使其包含了我想要的密钥服务器,按照我希望macOS读取它们的顺序,键服务器位于顶部,是第一次macOS读取。
https://askubuntu.com/questions/1357203
复制相似问题