Encrypt to a key without importing it to keyring

Seby seby2kt14 at gmail.com
Fri Nov 24 02:44:08 CET 2017


 Seby <seby2kt14 at gmail.com> wrote:
>> Approximation would be using ephemeral GNUPGHOME.
>>
>> I mean, starting your GnuPG session (or script) with:
>>
>>    $ export GNUPGHOME=$(mktemp -p /run/user/$(id -u) -d)
>>    $ chmod og-rwx $GNUPGHOME; echo $GNUPGHOME
>>
>> and remove the $GNUPGHOME after its use.
>>
>> This is very useful for testing GnuPG, for example.
[SNIP]
> Am I correct that a way around changing the GNUPGHOME variable is
> using the --no-default-keyring argument?

(No, that is not correct. --homedir is what overrides $GNUPGHOME)

Back to the subject, saving to at least a temporary keyring is my only
solution? Nothing else I can use in batch mode to serve the armored
key from clipboard somehow and do the operation?

If this is the only solution, what are the safety recommendations for
a use case where many many parallel requests will be sent to do
operations (possibly even using the same public key) so things don't
break? Does it help if I randomize --homedir and make it different
with every request / command?

Thanks.



More information about the Gnupg-users mailing list