mirror of
https://github.com/Mic92/sops-nix.git
synced 2025-12-26 22:24:59 +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
|
||||
|
||||
gpg --quiet --batch --gen-key "${GNUPGHOME}/key-template"
|
||||
echo "You can use the following command to save it to a file:"
|
||||
echo "cat > $HOSTNAME.asc <<EOF"
|
||||
gpg --export --armor
|
||||
echo 'EOF'
|
||||
echo >&2 "You can use the following command to save it to a file:"
|
||||
echo >&2 "cat > $HOSTNAME.asc <<EOF"
|
||||
gpg --export --armor >&2
|
||||
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"
|
||||
parent=$(dirname "$FINAL_GNUPGHOME")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue