From 368e991fe657703cc6b8a9e7f5452e0e5970e1c1 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sun, 11 Oct 2020 20:43:26 +0200 Subject: [PATCH] Add script for exporting public keys Signed-off-by: Matej Focko --- Makefile | 3 +++ scripts/export_keys.sh | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 scripts/export_keys.sh diff --git a/Makefile b/Makefile index 56065ca..f0d141e 100644 --- a/Makefile +++ b/Makefile @@ -14,3 +14,6 @@ fedora-deps: gpg: bash scripts/generate_gpg.sh + +keys: + bash scripts/export_keys.sh \ No newline at end of file diff --git a/scripts/export_keys.sh b/scripts/export_keys.sh new file mode 100644 index 0000000..e2ba84a --- /dev/null +++ b/scripts/export_keys.sh @@ -0,0 +1,8 @@ +#~/bin/bash + +echo ">>> Exporting SSH key <<<" +cat ~/.ssh/id_ed25519.pub + +echo ">>> Exporting public GPG key <<<" +ID=$(gpg --list-secret-keys --keyid-format LONG | perl -n -e'/^sec.*\/(\w*)\s+/ && print $1') +gpg --armor --export $ID \ No newline at end of file