spacemacs
spacemacs copied to clipboard
Missing gpg key?
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
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
Related: https://github.com/aquamacs-emacs/aquamacs-emacs/issues/166
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).
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.
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
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.
I tried this, passing the keyserver:
gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkp://keys.gnupg.net --recv-keys 066DAFCB81E42C40gpg: clave 066DAFCB81E42C40: "GNU ELPA Signing Agent (2019) <[email protected]>" sin cambios gpg: Cantidad total procesada: 1 gpg: sin cambios: 1It worked in Ubuntu 18.04.
Also works on centos 7.5.
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.
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
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
Try the following as I've also updated here
gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkps://keys.openpgp.org --recv-keys 066DAFCB81E42C40You might also like to add
keyserver hkp://keys.gnupg.netto your~/.emacs.d/elpa/gnupg/gpg.conffile
Yup, apparently the server you've pointed gpg to works better. I'll update my documents, too; thanks for the collective heads-up!
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 .
Please add additional information, at least your system information, when adding new comments.
Let's add this to FAQ.
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!
I have the same issue now with emacs28.2 on debian 12. after fresh install of spacemacs, I get this:
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!
gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkp://keyserver.ubuntu.com --recv-keys 645357D2883A0966
worked for me (Debian 12, Emacs 28.2)
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).
gpg --homedir ~/.emacs.d/elpa/gnupg --keyserver hkp://keyserver.ubuntu.com --recv-keys 645357D2883A0966worked 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.