symmetric encryption of '[stdin]' failed

Robert J. Hansen rjh at sixdemonbag.org
Sat Oct 15 18:50:49 CEST 2022


> why can't gpg accept passphrase in the terminal?

Depending on how you invoke GnuPG, it can.  It supports a lot of 
different ways of providing the passphrase.

The one that might work best for your purposes is to put the passphrase 
in a file, passphrase.txt, and then invoke GnuPG like this:

gpg -c --pinentry-mode loopback --passphrase-file passphrase.txt -o 
[myfile].tar.zstd.gpg

> Why does it need to start a daemon?

Because GnuPG 2.x already starts the daemon.  It should be running by 
the time you finish logging into your system.

> Besides, when I use "gpg -c file", it works fine. I =get asked for
> passphrase (via pinentry, I think)

And what do you think launches pinentry?

> so I am not sure what you mean by "Where in that command line do you
> specify a passphrase"

Really simple.  Where in that command line did you specify a passphrase?

You didn't tell GnuPG a passphrase file to use, a passphrase file 
descriptor to use, or an actual passphrase to use.  So the only thing 
GnuPG could do was ask you for one, and that means using gpg-agent to 
facilitate the interaction with the user.



More information about the Gnupg-users mailing list