On 06/01/2021 14:14, Dino Edwards via Gnupg-users wrote:
Hello all,In the past I used to be able to export a private key using the following command:/usr/bin/gpg --homedir /opt/.gnupg/ --export-secret-key -a "SOMEKEYID" > /opt /tmp/private.keySomething changed in the code and it now prompts me for the key password before it proceeds. I see the value in this, however this is problematic when I’m trying to automate the export to use in an application.What is the correct way to pass the key password in the command line in order to export the private key without getting the password prompt?
You could try: gpg --passphrase-fd 3 ...more-options... 3<somefilewhere somefile is a file containing the passphrase, or a fifo with a coprocess writing the passphrase to it...
-- Andrew Gallagher
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Gnupg-users mailing list Gnupg-users@gnupg.org http://lists.gnupg.org/mailman/listinfo/gnupg-users