spacemacs icon indicating copy to clipboard operation
spacemacs copied to clipboard

Missing gpg key?

Open JoKeyser opened this issue 5 years ago • 19 comments

During initial install on Ubuntu 18.04, I receive this gpg error:

Failed to verify signature archive-contents.sig:
No public key for 066DAFCB81E42C40 created at 2019-12-11T14:10:02+0100 using RSA
Command output:
gpg: Signature made Mi 11 Dez 2019 14:10:02 CET
gpg:                using RSA key C433554766D3DDC64221BFAA066DAFCB81E42C40
gpg: Can't check signature: No public key

And when I try to gpg --recv-keys 066DAFCB81E42C40, I get this:

gpg: key 066DAFCB81E42C40: 1 signature not checked due to a missing key
gpg: key 066DAFCB81E42C40: "GNU ELPA Signing Agent (2019) <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

JoKeyser avatar Dec 12 '19 10:12 JoKeyser

Oh, the fix was simple:

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

gpg: key 066DAFCB81E42C40: public key "GNU ELPA Signing Agent (2019) <[email protected]>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1

JoKeyser avatar Dec 12 '19 10:12 JoKeyser

Related: https://github.com/aquamacs-emacs/aquamacs-emacs/issues/166

karlicoss avatar Dec 24 '19 20:12 karlicoss

I wonder if it's worth reopening? Not sure what's the proper way to resolve this would be, but this must be very confusing for people new to Spacemacs (half of packages failing to install).

karlicoss avatar Dec 24 '19 20:12 karlicoss

Emacs 26.3 is supposed to have fixed the signature issue.

And the ppa:kelleyk/emacs has updated the keys for older Emacs versions: ELPA signing key expired https://github.com/kelleyk/ppa-emacs/issues/9

So the issue might have been fixed in linux, maybe the Mac Emacs distributions need to update the key for older Emacs versions.

duianto avatar Dec 28 '19 15:12 duianto

Not fixed in Linux (Ubuntu 18.04.4), just ran into it today. I can confirm it is confusing for new people. For instance, I don't know whether I should 1) just import the gpg key and restart; 2) remove everything in elpa except the gnupg folder and then import gpg key; 3) remove everything in elpa and issue emacs --insecure

vvarik avatar Jun 11 '20 14:06 vvarik

I tried this, passing the keyserver: gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkp://keys.gnupg.net --recv-keys 066DAFCB81E42C40

gpg: clave 066DAFCB81E42C40: "GNU ELPA Signing Agent (2019) <[email protected]>" sin cambios
gpg: Cantidad total procesada: 1
gpg:              sin cambios: 1

It worked in Ubuntu 18.04.

stradicat avatar Aug 27 '20 13:08 stradicat

I tried this, passing the keyserver: gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkp://keys.gnupg.net --recv-keys 066DAFCB81E42C40

gpg: clave 066DAFCB81E42C40: "GNU ELPA Signing Agent (2019) <[email protected]>" sin cambios
gpg: Cantidad total procesada: 1
gpg:              sin cambios: 1

It worked in Ubuntu 18.04.

Also works on centos 7.5.

iddm avatar Sep 07 '20 10:09 iddm

I should clarify, I'm not a spacemacs user, just straight emacs but I don't think that matters beyond the repo the issue happens to be in. Just reaching out for help wherever I can.

I'm still having experiencing this issue (Ubuntu 18.04). I tried the command suggested by @dennismayr which results in:

gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkp://keys.gnupg.net --recv-keys 066DAFCB81E42C40 gpg: keyserver receive failed: No data

When I search the keyserver via web-browser I can't find the fingerprint either and I'm completely lost. I have a related stackexchange post here with all the info. The main roadblock I seem to hit is that I can never find the fingerprint and I have no idea why.

refmitchell avatar Sep 11 '20 15:09 refmitchell

Easiest fix for me was to just install emacs 27.1

For ubuntu:

sudo add-apt-repository ppa:kelleyk/emacs
sudo apt update
sudo apt install emacs27

Grazfather avatar Jan 08 '21 18:01 Grazfather

Try the following as I've also updated here

gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkps://keys.openpgp.org --recv-keys 066DAFCB81E42C40

You might also like to add keyserver hkp://keys.gnupg.net to your ~/.emacs.d/elpa/gnupg/gpg.conf file

toomaj avatar Aug 04 '21 05:08 toomaj

Try the following as I've also updated here

gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkps://keys.openpgp.org --recv-keys 066DAFCB81E42C40

You might also like to add keyserver hkp://keys.gnupg.net to your ~/.emacs.d/elpa/gnupg/gpg.conf file

Yup, apparently the server you've pointed gpg to works better. I'll update my documents, too; thanks for the collective heads-up!

stradicat avatar Aug 05 '21 17:08 stradicat

I wonder if it's worth reopening? Not sure what's the proper way to resolve this would be, but this must be very confusing for people new to Spacemacs (half of packages failing to install).

I can't agree it more.Some very sticky troubles always happened when I started .

ghost avatar Aug 25 '22 12:08 ghost

Please add additional information, at least your system information, when adding new comments.

lebensterben avatar Aug 25 '22 16:08 lebensterben

Let's add this to FAQ.

lebensterben avatar Aug 25 '22 16:08 lebensterben

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

github-actions[bot] avatar May 01 '24 16:05 github-actions[bot]

I have the same issue now with emacs28.2 on debian 12. after fresh install of spacemacs, I get this:

image

Trying to get the key manually also failed:

▶ gpg --homedir ~/.emacs.d/elpa/gnupg --receive-keys 645357D2883A0966          
gpg: keyserver receive failed: No data

Any advice would be appreciated. Thanks!

CFGrote avatar May 24 '24 07:05 CFGrote

gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkp://keyserver.ubuntu.com --recv-keys 645357D2883A0966

worked for me (Debian 12, Emacs 28.2)

sebogh avatar May 25 '24 15:05 sebogh

Thanks @sebogh , switching to hkp://keyserver.ubuntu.com solved it for me, too. The missing key was 645357D2883A0966 in my case, though (as per your edited comment).

CFGrote avatar May 27 '24 08:05 CFGrote

gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkp://keyserver.ubuntu.com --recv-keys 645357D2883A0966

worked for me (Debian 12, Emacs 28.2)

This also worked for me on Pop!_OS 22.04 LTS using Emacs 27.1, with the same key.

george-greene avatar Jul 07 '24 18:07 george-greene