You are not logged in.

#1 2022-06-04 15:47:24

Registered: 2010-03-17
Posts: 17

[SOLVED] gpg importing keys error: Server indicated a failure

Hello! I've always been quite resourceful with figuring out solutions to arch problems, but I've been stuck on an issue for two full days already and I can't figure out wth is going on

I'm trying to install `mingw-w64-pcre` and `mingw-w64-readline`, both with the help of `yay` but also manually with `makepkg`... but they depend on gpg signatures and gpg is not being able to connect for whatever reason

:: PGP keys need importing:
-> 7C0135FB088AAF6C66C650B9BB5869F064EA74AB, required by: mingw-w64-readline
-> 45F68D54BBE23FB3039B46E59766E084FB0F43D8, required by: mingw-w64-pcre
==> Import? [Y/n]
:: Importing keys with gpg...
gpg: keyserver receive failed: Server indicated a failure
-> problem importing keys

Things that I've done:
1-.  I've checked the signatures manually, they exist in the keyserver and I can download them through the web browser
2-.  I've tried to install the keys manually after downloading the `.arc` file from the keyserver, but without success (never done this before anyway, so might as well be making some dumb mistake).  When I list the installed keys that gpg knows about (all three types), none of the required keys are there.
3-.  I've tried asking for the keys in verbose mode, but there is no extra info shown `gpg --verbose --recv-keys THESIG`
4-.  I've checked both the user and global gpg config files, and they correctly list the keyserver that I accessed directly through the web browser (and some other keyservers I didn't add). Server address was added in `~/.gnupg/gpg.conf`, with the line: `keyserver hkps://`
5-.  I have rebooted my pc, and restarted the gpgagent service through systemctl, after changing the keyservers
6-.  I have both commented and removed the `validpgpkeys( ... )` line from the `PKGBUILD` file, and also configured yay to not fetch keys, but then the package fails because the signatures cannot be validated.

I think this is a problem with gpg not correctly connecting. But launching gpg with `gpg --verbose` makes no difference, so I'm really lost in how to tackle this.
Any clues on how to track what is going on? ?

Last edited by fatum (2022-06-04 17:36:46)


#2 2022-06-04 15:52:46

Registered: 2012-09-01
Posts: 9,281

Re: [SOLVED] gpg importing keys error: Server indicated a failure

Well, fixing gnupg wouldn't be a bad thing, but just updating archlinux-keyring should get you past this.

EDIT: My fault, the error coming from a helper confused me. Different issue than I was thinking, ignore above.

Try the ubuntu keyserver.

Last edited by Scimmia (2022-06-04 15:54:54)


#3 2022-06-04 17:36:11

Registered: 2010-03-17
Posts: 17

Re: [SOLVED] gpg importing keys error: Server indicated a failure

I managed to solve this, but I don't know exactly how I did it
I tracked it down to gpg not being able to connect to the servers
Someone on discord helped me, and with some of that and other things I changed in the gpg configs, it started working

The end result is the only thing I can give as advice, if someone lands here in the future from a google search or something.

~/.gnupg/gpg.conf     and     /etc/pacman.d/gnupg/gpg.conf

ended as having not a single keyserver entry
It only worked properly when all the preexisting keyserver lines were removed :shrug:


#4 2022-06-20 19:23:04

Registered: 2008-04-08
Posts: 68

Re: [SOLVED] gpg importing keys error: Server indicated a failure

I had the same error: "gpg: keyserver receive failed: Server indicated a failure". So I dug into the problem:

gpg --keyserver hkp:// --list-keys ...

failed with the same error.


works.  Well, it doesn't respond to pings, but at least it returned an address.



Why would ping work and nslookup fail?  nslookup uses /etc/resolv.conf and oddly, mine is empty.  I'm using systemd-resolved, so it should be managing that for me.  Not sure how it went wrong, but I fixed it with:

sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

Now gnupg is working fine.


Board footer

Powered by FluxBB