I'm trying to add a key to gpg:
$ gpg --recv-key 12345
gpg: keyserver receive failed: No keyserver available
Then I do this:
$ gpg --list-keys
gpg: /home/me/.gnupg/trustdb.gpg: trustdb created
but the error remains. How can I can fix it?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityI'm trying to add a key to gpg:
$ gpg --recv-key 12345
gpg: keyserver receive failed: No keyserver available
Then I do this:
$ gpg --list-keys
gpg: /home/me/.gnupg/trustdb.gpg: trustdb created
but the error remains. How can I can fix it?
You should specify a keyserver to use.I typically use --keyserver wwwkeys.uk.pgp.net
(you can use a lot of different country codes instead of uk
, but I know that one works).
wwwkeys.uk.pgp.net
. You can probably add it your configuration, and it might be a good idea, I've just never bothered to. --keyserver
is listed in the man page, so it should work, the complete command will be something like gpg --keyserver wwwkeys.uk.pgp.net --recv-keys 12345678
.
– Henrik supports the community
Jul 10 '16 at 22:04