Page MenuHome GnuPG

Passphrase dialog despite --passphrase option
Closed, ResolvedPublic

Description

gpg prompts for a passphrase (graphical dialog box on Gnome) even when the
--passphrase is used.
Moreover, at least if Cancel is hit, the value in the --passphrase option is
used, which is not what one would expect.
As a result, it becomes impossible to leave unattended a script that prompts for
a password and then uses it while calling gpg several times.

Details

Version
1.4.6

Event Timeline

I'm assuming that this issue was resolved since Eric didn't reply.

neal claimed this task.

It's actually --no-use-agent:

$ echo "cleartext" | gpg --passphrase "some-passphrase" -c --no-use-agent > text.encrypted
$ cat text.encrypted | gpg --passphrase "passphrase" --no-use-agent 2>/dev/null
$ cat text.encrypted | gpg --passphrase "some-passphrase" --no-use-agent 2>/dev/null
cleartext