$ gpg --version
gpg (GnuPG) 2.4.8
Simple hanging!
pkill -9 dirmngr
cat <<EOF > ~/.gnupg/dirmngr.conf
disable-ipv6
standard-resolver
keyserver hkps://keys.openpgp.org:443
EOF
gpg --recv-key AA69A48B2A51091D
gpg: key AA69A48B2A51091D: "Gabor Somogyi (CODE SIGNING KEY) <[email protected]>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
There are cases when gpg is just hanging. This could happen when globbing is used with nullglob.
In short when a command has glob inside (gpg --armor --detach-sig apache_flink*.tar.gz)
and there is no file matching then the result is empty which makes gpg command wait on stdin.
The solution is unsetopt nullglob which will make globbing blow up when no file exists.