Yuki
Yuki

Reputation: 4173

Emacs: Failed to verify signature archive-contents.sig

Recently tried to update emacs packages and got this.

Failed to verify signature archive-contents.sig:
No public key for 066DAFCB81E42C40 created at 2019-10-02T10:10:02+0100 using RSA
Command output:
gpg: Signature made Wed 02 Oct 2019 10:10:02 AM BST
gpg:                using RSA key C433554766D3DDC64221BFAA066DAFCB81E42C40
gpg: Can't check signature: No public key

Any ideas why?

Upvotes: 66

Views: 37986

Answers (4)

Scott Hootman-Ng
Scott Hootman-Ng

Reputation: 1

I recently had this issue and want to help people who may have similar issues in the future. I tried to use gnu-elpa-keyring-update, but it also failed because it pointed to an expired URL. To fix this,

  1. Go to the package website: https://elpa.gnu.org/packages/gnu-elpa-keyring-update.html, download the latest .tar file.

  2. Run tar -xvf gnu-elpa-keyring-update-2022.12.1.tar, or whatever the latest filename version is (this was the latest as of writing this answer) in the terminal where the current directory is where the file is located.

  3. Now that the files are extracted from the .tar, you'll want the update.el file. To load it in emacs use M-x load-file, navigate to the update.el file and hit enter.

  4. Now, with it pointing to the correct URL, running package-refresh-contents should work with no errors (or at least not the error from this question).

Upvotes: -1

C. Aknesil
C. Aknesil

Reputation: 439

I got a similar error in Windows 10 including the following line

gpg: keyblock resource '/c/Users/<theuser>/c:/Users/<theuser>/.emacs.d/elpa/gnupg/pubring.kbx': No such file or directory

It turned out that Emacs was using the GnuPG installed via MSYS2. Installing the Windows version of GnuPG (Gpg4win) solved it.

Upvotes: 2

Aaron F
Aaron F

Reputation: 447

Try renaming your ~/.emacs.d/elpa/gnupg file to something else as a backup and then run M-x package-refresh-contents. This is what worked for me.

Upvotes: 2

Stefan
Stefan

Reputation: 28531

See https://emacs.stackexchange.com/questions/233/ for the same question.

The signature check failed because you don't have the new key (the old signature key expired on Sep 23). The new key is available from the usual GPG key-servers, comes with Emacs≥26.3, and can also be obtained by installing the package gnu-elpa-keyring-update.

Upvotes: 48

Related Questions