Export private key

Dino Edwards dino.edwards at mydirectmail.net
Wed Jan 6 17:12:32 CET 2021

> You could try:

>    gpg --passphrase-fd 3 ...more-options... 3<somefile

> where somefile is a file containing the passphrase, or a fifo with a coprocess writing the passphrase to it...

That did not seem to work. But after searching for gpg --passphrase-fd, I found the following command that works:

/usr/bin/gpg --pinentry-mode=loopback --passphrase "SOMEPASSWORD" --homedir /opt/.gnupg/ --export-secret-key -a "SOMEKEYID"  >  /opt /tmp/private.key

More information about the Gnupg-users mailing list