mirror of
https://github.com/Mic92/sops-nix.git
synced 2026-01-09 15:12:36 +08:00
sops-init-gpg-key: print fingerprint
This commit is contained in:
parent
d8e505804a
commit
bdfd4c3389
1 changed files with 7 additions and 4 deletions
|
|
@ -66,10 +66,13 @@ Expire-Date: 0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
gpg --quiet --batch --gen-key "${GNUPGHOME}/key-template"
|
gpg --quiet --batch --gen-key "${GNUPGHOME}/key-template"
|
||||||
echo "You can use the following command to save it to a file:"
|
echo >&2 "You can use the following command to save it to a file:"
|
||||||
echo "cat > $HOSTNAME.asc <<EOF"
|
echo >&2 "cat > $HOSTNAME.asc <<EOF"
|
||||||
gpg --export --armor
|
gpg --export --armor >&2
|
||||||
echo 'EOF'
|
echo >&2 'EOF'
|
||||||
|
|
||||||
|
fpr=$(gpg --quiet --list-keys --with-colons --fingerprint | awk -F: '$1 == "fpr" { print $10;}')
|
||||||
|
echo >&2 "fingerprint: $fpr"
|
||||||
|
|
||||||
rm "${GNUPGHOME}/key-template"
|
rm "${GNUPGHOME}/key-template"
|
||||||
parent=$(dirname "$FINAL_GNUPGHOME")
|
parent=$(dirname "$FINAL_GNUPGHOME")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue