dotfiles/dot_bin/executable_gpg-recv-http

12 lines
234 B
Bash

#!/bin/bash
# Import gpg keys using https protocol
#
# usage:
# gpg-recv-keys KEYHASH
keypath=/tmp/this.key
curl -L -o "$keypath" "https://keyserver.ubuntu.com/pks/lookup?search=0x$1&op=get"
gpg --import "$keypath"
rm -f "$keypath"