Skip to content

Instantly share code, notes, and snippets.

@waffle2k
Created March 18, 2014 18:07
Show Gist options
  • Save waffle2k/9625859 to your computer and use it in GitHub Desktop.
Save waffle2k/9625859 to your computer and use it in GitHub Desktop.
Import public keys from a webpage.
#!/bin/bash
#
# Import public keys from a wiki page, etc.
# Poor man's keyserver.
SOURCE=$1
if [ -z $SOURCE ]; then
echo "Please supply a URL"
exit 1
fi
curl -s $SOURCE | sed -ne '/BEGIN PGP PUBLIC KEY BLOCK/,/END PGP PUBLIC KEY BLOCK/p' | gpg --import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment