How to fix gpg: keyserver receive failed: No route to host

#gpg #linux #cli

  1. Open ~.gnupg/gpg.conf and add the following line:
keyserver hkp://keyserver.ubuntu.com:80
  1. If the above step doesn’t work, check (and change) your DNS:
cat /etc/resolv.conf