在哪里可以找到 Gnu Emacs 的公钥?
我从23.1到23.3使用emacs才半年。
每次我尝试为 emacs 查找 gpg 公钥,以便可以使用每个新版本发布的 tar.gz.sig 检查 tar.gz 包时,我都失败了。
看来我应该先获取公钥,我搜索了emacs的网站,但没有找到标志...
我只能在邮件列表中找到SHA1校验和 http://lists.gnu.org/archive /html/info-gnu-emacs/2011-03/msg00000.html 进行完整性检查
我该怎么做?
I have used emacs for only half a year from 23.1 to 23.3.
Every time I tried to find gpg public key for emacs so that I could check tar.gz package with tar.gz.sig released with every new version, I failed.
It seems I should fetch public key first, and I searched the website of emacs, but never found a sign...
I can only find SHA1 checksum in the mailing list
http://lists.gnu.org/archive/html/info-gnu-emacs/2011-03/msg00000.html to do the integrity check
How do I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
如果您尝试使用以下命令验证签名
,您将得到如下输出:
The key ID you are waiting for is
BE216115
,因此您要求 gpg 使用以下命令检索它:这会导致以下结果:我的安装:
现在,您可以验证它。但由于您尚未对此密钥分配任何信任,因此输出将是:
因此,您将知道签名是有效的,但您不信任公钥。您可以使用以下方式信任或签署公钥:
在命令提示符中键入
help
以查看所有可用选项。有关更多信息,请参阅使用 GNU Privacy GuardIf you try to verify the signature using
you'll get an output like the following:
The key ID you are looking for is
BE216115
, so you ask gpg to retrieve it using:Which resulted in the following on my installation:
Now, you can verify it. But since you haven't assigned any trust to this key, the output will be:
So, you will know that the signature is valid, but you are not trusting the public key. You can trust or sign the public key using:
In the command prompt type
help
to see all the available options. For further information, see Using the GNU Privacy GuardGNU 密钥环位于 https://ftp.gnu.org/gnu/gnu-keyring。 gpg
您可以在本地导入它们(下载后)
The GNU keyring is at https://ftp.gnu.org/gnu/gnu-keyring.gpg
You can import them locally (after downloading) with
GNU FTP 服务器的根级别有一个 README 文件,它解释了如何使用签名。
请参阅 https://ftp.gnu.org/README 了解最新版本。
当前文件说:
There is a
README
file at the root level of the GNU FTP server which explains how to use the signatures.See https://ftp.gnu.org/README for the up-to-date version.
The current file says:
@vhallac 的答案现已过时(我正在尝试验证 emacs-24.4 下载)。如果您不想下载并导入整个 GNU 密钥环(如 @JSON 所讨论的),这里有一种方法可以完成此任务。在这个答案中,我将展示今天有效的方法,以及如何找出一年后有效的方法。
首先下载 emacs 及其
.sig
文件。我有:假设您已经安装了 gpg,请尝试验证它:
在这次尝试中,它失败了(您将在本文末尾看到一次成功的尝试)。我没有公钥。输出告诉您需要获取哪个公钥:
A0B0F199
。 (这是将来最有可能改变的事情。)因此,我尝试使用默认命令下载它:
它只是挂起。那是因为我的 ufw(我的 Linux 防火墙软件)阻止了大多数端口。您可以告诉 gpg 使用端口 80,如下所示:
它通过了防火墙,但失败了,因为由于某种原因,Emacs/FSF 密钥不再存储在 gnupg 服务器上。因此,我尝试了我所知道的其他密钥服务器,并且有一定程度的信任:
好的,它有效。现在检查一下:
是的,明白了。
现在我可以验证下载的 emacs tarball:
签名“良好”,但不可信。有关如何信任该密钥的信息,请参阅其他答案。
The answer from @vhallac is now out of date (I'm trying to verify an emacs-24.4 download). If you don't want to download and import the entire GNU keyring (as @JSON discussed), here's a way to get this done. In this answer I'll show what works today but also how to figure out what will work a year from now.
First download emacs and its
.sig
file. I have:Assuming you already have gpg installed, try to verify it:
In this attempt, it fails (you'll see a successful attempt at the end of this post). I don't have the public key. The output tells you which public key you need to obtain:
A0B0F199
. (This is the thing that will most likely change in the future.)So I then try to download it with the default command:
It just hangs. That's because I have
ufw
(my Linux firewall software) blocking most ports. You can tell gpg to use port 80, like so:That got through the firewall, but fails because, for some reason, the Emacs/FSF keys are no longer being stored on the gnupg server. So I tried the other keyserver I know about and have some level of trust of:
OK, it worked. Now check it:
Yep, got it.
Now I can verify the downloaded emacs tarball:
The signature is "good", but not trusted. See the other answers for how to trust that key.
Emacs 需要更新包
gnu-elpa-keyring-update
。但是...如果没有更新的gnu-elpa-keyring-update
软件包,您将无法做到这一点。因此,有必要执行以下操作:
package-check-signature
设置为nil
。gnu-elpa-keyring-update
。package-check-signature
变量值。来自我的
init.el
的代码(在设置包存档之后添加,但在使用use-package
或其他工具安装任何包之前添加):Emacs need update package
gnu-elpa-keyring-update
. But... without updatedgnu-elpa-keyring-update
package you can't do it.For this reason, it is necessary to do the following:
package-check-signature
tonil
.gnu-elpa-keyring-update
.package-check-signature
variable value.Code from my
init.el
(add after setting package archives, but before installing any package withuse-package
or another tools):