I am getting the following error while startup

Failed to verify signature dash-2.12.0.tar.sig:
No public key for 066DAFCB81E42C40 created at 2019-09-21T23:24:49+0530 using RSA
Command output:
gpg: WARNING: unsafe permissions on homedir `c:/Users/sreekumar.14CPU0014/AppData/Roaming/.emacs.d/elpa/gnupg'
gpg: Signature made Sat Sep 21 23:24:49 2019 IST using RSA key ID 81E42C40
gpg: Can't check signature: public key not found

I don't know what is the reason and how to correct it?

Updated part of init file

   (require 'package)
   (add-to-list 'package-archives
        '("melpa-stable" . "https://stable.melpa.org/packages/") t)
   (add-to-list 'package-archives
        '("org" . "http://orgmode.org/elpa/") t)
   (add-to-list 'package-archives
        '("melpa" . "http://melpa.milkbox.net/packages/") t)
  • Bisect your init file to see which part causes the problem. Narrow your question to cover only that part. Show the problematic code.
    – Drew
    Dec 11, 2019 at 15:48
  • Please see the updated .init file. I am fetching packages from three repositories. Dec 12, 2019 at 5:27
  • You get that error only when you have all of that in your init file - all 3 packages?
    – Drew
    Dec 12, 2019 at 5:29
  • I think so. But not sure. Dec 12, 2019 at 10:46
  • Bisecting should tell you that. If you add all 3 packages you can't easily know.
    – Drew
    Dec 12, 2019 at 16:19

1 Answer 1


This seems to be related to the GPG key update for the ELPA archive: new packages are signed with the new key.

Solution 1

Download the package gnu-elpa-keyring-update. This will install the public key for 066DAFCB81E42C40, which you are missing.

Solution 2

Upgrade to at least Emacs 26.3, which comes with the new GPG key.

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.