From de8e5ee7d48cd8016bd126397c9a1c8e1f6d4599 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Tue, 2 Aug 2022 22:29:46 -0400 Subject: [PATCH] ENH make gpg key importer actually import --- dot_bin/executable_gpg-recv-http | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dot_bin/executable_gpg-recv-http b/dot_bin/executable_gpg-recv-http index 00633a7..8d9dfd8 100644 --- a/dot_bin/executable_gpg-recv-http +++ b/dot_bin/executable_gpg-recv-http @@ -1,5 +1,11 @@ #!/bin/bash -# WIP, idea is to use this get request to pull a key manually without using gpg itself...seems to work better -curl -L -o test.key 'https://keyserver.ubuntu.com/pks/lookup?search=0xC5705533DA4F78D8664B5DC0575159689BEFB442&op=get' +# 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"