I'm getting this error whenever I run M-x package-refresh-contents or M-x package-list-packages, which is related to Emacs keyring update:

Failed to verify signature archive-contents.sig:
No public key for 066DAFCB81E42C40 created at 2020-12-16T17:05:02-0500 using RSA
Command output:
gpg: Signature made Wed 16 Dec 2020 05:05:02 PM EST
gpg:                using RSA key C433554766D3DDC64221BFAA066DAFCB81E42C40
gpg: Can't check signature: No public key

I'm trying to follow the steps at http://elpa.gnu.org/packages/gnu-elpa-keyring-update.html to manually update the ELPA keyring. I can't install the package using M-x package-install RET gnu-elpa-keyring-update RET (It says [No match] when I issue that command).

In the same page, listed are three different ways to fix this manually. I tried the first two and both don't work.

$ gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40
gpg: keyserver receive failed: General error
$ gpg --homedir ~/.emacs.d/elpa/gnupg --quick-set-expire 474F05837FBDEF9B 1y
gpg: "474F05837FBDEF9B" is not a fingerprint

Now, how can I try the third way (temporarily disable signature verification)?

Some system details:

$ emacs --version
GNU Emacs 25.2.2
Copyright (C) 2017 Free Software Foundation, Inc.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
$ uname -a
Linux jetson 4.9.140-tegra #1 SMP PREEMPT Tue Oct 27 21:02:37 PDT 2020 aarch64 aarch64 aarch64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:    18.04
Codename:   bionic

1 Answer 1


I had the same issue on Ubuntu 18.04 (Bionic).

The instructions on https://emacs.stackexchange.com/questions/60554/cannot-run-melpa-package-refresh-due-to-gpg-errors solved the problem for me:

Generate a file called gpg.conf in ~/.emacs.d/elpa/gnupg/ with the following line:

keyserver hkp://keys.gnupg.net

Then, run the following command:

gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 066DAFCB81E42C40

Now, Emacs should be able to get data from Elpa without any error messages:

M-x package-refresh-contents RET

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.