首页 > 解决方案 > GNU Emacs 下载的 gpg 验证失败 - 我做对了吗?

问题描述

我已经下载了一个 GNU tar 存档 ( emacs-26.1.tar.xz),现在想根据它的签名文件来验证它。gpg使用选项返回verify以下输出:

    gpg: no valid OpenPGP data found.
    gpg: the signature could not be verified.

显然无法验证下载。但是,这是什么意思?tar 存档可能已损坏?还是我没有导入正确的密钥?


这是我所做的一步一步:

  1. 我下载了存档文件及其.sig文件:

    $ wget https://ftp.gnu.org/gnu/emacs/emacs-26.1.tar.xz
    $ wget https://ftp.gnu.org/gnu/emacs/emacs-26.1.tar.xz.sig
    
  2. 我下载了 GNU 密钥环(Emacs 下载页面给了我链接):

    $ wget https://ftp.gnu.org/gnu/gnu-keyring.gpg
    
  3. 我导入了gpgGNU 密钥环:

    $ gpg --import gnu-keyring.gpg 
    

    请注意,这返回:

    .
    .
    .
    gpg: Total number processed: 525
    gpg:               imported: 525  (RSA: 187)
    gpg: no ultimately trusted keys found
    
  4. 最后我验证了 tar 存档:

    gpg --verify emacs-26.1.tar.xz.sig emacs-26.1.tar.xz
    

    然后返回(如顶部所述):

    gpg: no valid OpenPGP data found.
    gpg: the signature could not be verified.
    Please remember that the signature file (.sig or .asc)
    should be the first file given on the command line.
    

那么,是 tar 存档损坏还是我没有导入正确的密钥?如果是后者,那么这个 GNU 下载的正确密钥是什么?

标签: downloadgnupggpg-signature

解决方案


推荐阅读