4

Emacs gives a error about not finding a GPG key.

The Error

Failed to verify signature archive-contents.sig:
No public key for 066DAFCB81E42C40 created at 2020-08-22T21:05:02+0000 using RSA
Command output:
gpg: keyblock resource '/e/z_gis/gulfmx/c:/Users/jake9/msys64/home/jake9/.emacs.d/elpa/gnupg/pubring.kbx': No such file or directory
gpg: Signature made Sat, 22 Aug, 2020 21:05:02 CUT
gpg:                using RSA key C433554766D3DDC64221BFAA066DAFCB81E42C40
gpg: Can't check signature: No public key

Weird Path

What is really weird is the keybox path given:

  • /e/z_gis/gulfmx/c:/Users/jake9/msys64/home/jake9/.emacs.d/elpa/gnupg/pubring.kbx

The first part is what ever working directory I was in when Emacs launched:

  • /e/z_gis/gulfmx/

My Setup

  • OS: Win10
  • msys2 / mingw64
  • Emacs 27.1

gnu-elpa-keyring-update version 2019.3 is installed.

2

I had the same problem, on msys2, with the mingw64 version of emacs, which is 27.1, incidentally.

The problem I've found comes from emacs's package.el not agreeing (in msys2's context) with gpg on what to do with the --homedir argument.

As it is suggested here, package.el sets this argument to be (expand-file-name "gnupg" package-user-dir), but, unfortunately, expand-file-name returns a path that starts with "c:/etc..." and gpg does not understand this syntax, and simply appends this string to the current working directory. This is then a meaningless path.

But on msys2 you can send "/c/etc...", instead, which gpg understands and uses as it is.

So, my solution is to set package-gnupghome-dir to your actual linux-style path "/c/Users/jake9/msys64/home/jake9/.emacs.d/elpa/gnupg/"

Now I realize you are using your msys2 home (and not your Windows home) so maybe you can get away with setting package-gnupg-home to just "/home/jake9/.emacs.d/elpa/gnupg/"

0

I have been experiencing same issue with GNU's official Emacs install, since Emacs 27.1.

For now, the only way I found to fix it is to disable signature checking and verify all packages by hand.

In my init.el I have temporarily added:

;; disable because of elpa bug in emacs 27.1
(setq package-check-signature nil)

Hopefully the bug will be fixed in next release.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.