Skip to content

Instantly share code, notes, and snippets.

@orangecms
Last active December 16, 2017 03:35
Show Gist options
  • Save orangecms/8c5f7e86fdb5314501a87a8c74fdf82c to your computer and use it in GitHub Desktop.
Save orangecms/8c5f7e86fdb5314501a87a8c74fdf82c to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
_KEY=$1
curl "https://keyserver.opensuse.org/pks/lookup?op=get&search=0x$_KEY" | tail -n +13 | head -n -2 > "/tmp/$_KEY.asc"
gpg --import "/tmp/$_KEY.asc"
rm "/tmp/$_KEY.asc"
@lambdafu
Copy link

HKP uses port 11371, so if that was blocked, it won't work. But hkps uses port 443 just as https, so that will always work. Just make sure you choose a hkps-capable keyserver or pool and you should be ok (except that GnuPG nowadays also needs to do DNS lookups, but it's uncommon for those to be blocked).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment