-
-
Save jfinstrom/93b5c3a4d04a94ef7e6188b6e0db6965 to your computer and use it in GitHub Desktop.
Bash shell script to automate PGP key signing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while [ 1 ]; do | |
echo ">> Enter an email address:" | |
read EMAIL | |
gpg --keyserver pgp.mit.edu --search-keys $EMAIL | |
FINGERPRINT=`gpg --fingerprint $EMAIL` | |
[[ $FINGERPRINT =~ 2048[DR]/([0-9A-F]{8}) ]]; | |
KEY_ID=${BASH_REMATCH[1]} | |
gpg --sign-key $EMAIL | |
echo ">> Going to sign key $KEY_ID" | |
gpg --armor --export $KEY_ID > $KEY_ID.asc | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment