Using a Debian9 server, behind a proxy, I need to install a docker client. So to get a key I use the commands:

apt-key adv --keyserver http://WHATEVERKEYSERVERITRY --keyserver-options http-proxy="http://proxy.myclientdomain:4128" --recv-keys 7EA0A9C3F273FCD8
Executing: tmpapt-key-gpghome.BO0J96KdNM/gpg.1.sh --keyserver http://WHATEVERKEYSERVERITRY --keyserver-options http-proxy=http://proxy.myclientdomain:4128 --recv-keys 7EA0A9C3F273FCD8
gpg: keyserver receive failed: no key server available

I tryied all keyring/MIT/debian etc... keyservers I know (about 5/6) The proxy is not the cause, apt-update , ping to www.google.com & so on ... are just OK.

I think there is another root cause somewhere else... but it is not possible, really not, neither to change anything neither get infrastructure information.

So the question is: is there another method to get the key 7EA0A9C3F273FCD8 100% online, generating a file I can then copy/paste?

  • 2
    “The proxy is not in cause” — I’ve seen quite a few proxies that work fine for downloads etc. but that mess up GPG key retrieval! Jan 16 '18 at 18:19
  • ah ? thanks ... then maybe it can be in cause.... ok
    – francois P
    Jan 16 '18 at 18:26

If all else fails, you can use

curl "https://pgp.surfnet.nl/pks/lookup?op=get&search=0x7EA0A9C3F273FCD8"

and extract the public key block from the output, for example

curl "https://pgp.surfnet.nl/pks/lookup?op=get&search=0x7EA0A9C3F273FCD8" |
awk '/^-----BEGIN/ { output = 1 }; output; /^-----END/ { output = 0 }'
  • this method worked well for me :) thanks again
    – francois P
    Jan 17 '18 at 17:02

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.