Update file run_onchange_before_91-configure-gpg.tmpl

This commit is contained in:
Brian Zalewski 2023-01-05 02:49:37 +00:00
parent 86716c4042
commit 4f0eb7e9fb

View file

@ -30,6 +30,11 @@ if [ -n "$KEYID" ] && command -v gpg > /dev/null; then
if [ -n "$EXIT_CODE" ]; then
logg error 'Failed to retrieve public user GPG key on hkps://pgp.mit.edu'
gpgconf --kill dirmngr
KEYID="${KEYID^^}"
KEYID="$(echo "$KEYID" | sed 's/^0X/0x/')"
if [ -f "$HOME/.gnupg/$KEYID.key" ]; then
gpg --import "$HOME/.gnupg/$KEYID.key"
fi
else
logg success 'Successfully imported configured public user GPG key'
fi