I'm getting this error while trying download a package from ELPA:

 Failed to verify signature archive-contents.sig:
 No public key for 474F05837FBDEF9B created at 2018-11-28T14:10:03-0800 using DSA
 Command output:
 gpg: keyblock resource '/c/apps/emacs-25.3_1/bin/c:/users/myuserid/.emacs.d/elpa/gnupg/pubring.kbx': No such file or directory
 gpg: Signature made Wed Nov 28 14:10:03 2018 PST
 gpg:                using DSA key CA442C00F91774F17F59D9B0474F05837FBDEF9B
 gpg: Can't check signature: No public key

I've been doing some clean up in my init file but I don't see how it could have impacted this. In a way it's a good thing because it's a good opportunity to setup gpg but it's not working for me. I used customize-apropos to set these values:

  '(epg-gpg-home-directory "C:/Program Files/Git")
  '(epg-gpg-program "gpg.exe --homedir /c/users/myuserid/.emacs.d/elpa/gnupg")

I'm using the gpg that comes with my git client. However, no matter what I set it doesn't seem to care, it still has the invalid path the keys.

What could be causing these gpg variables to not be respected??


I encountered this issue. I solved it using the following steps in order:

  1. Installing Gpg4win
  2. Make sure that the folder c:/Progra~2/GnuPG/bin is on your path before any other installed versions of the GnuPG executables (in my case, I had it installed via msys2).

Note that Progra~2 expands to "Program Files (x86)" on my system (I am using the 64 bit version of Windows, you might need to substitute Progra~1 in the string if you are using a 32 bit version of Windows).

| improve this answer | |

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.