command line complexity
command line complexity
Posted Jan 21, 2026 17:37 UTC (Wed) by ballombe (subscriber, #9523)Parent article: Responses to gpg.fail
Debian popularity-contest needs to encrypt a file non-interactively with a fixed, locally available, public PGP key.
This requires the creating of a temporary directory and the use of 11 command line options to gpg:
This requires the creating of a temporary directory and the use of 11 command line options to gpg:
GPGHOME=`mktemp -d`
gpg --batch --no-options --no-default-keyring --trust-model=always \
--homedir "$GPGHOME" --keyring $KEYRING --quiet \
--armor -o "$POPCONGPG" -r $POPCONKEY --encrypt "$POPCON"
rm -rf "$GPGHOME"
In particular there does not seem any way to specify a public key as a standalone file instead of as a part of a keyring.
