Dustin Oprea
Dustin Oprea

Reputation: 10266

GPG Ignores --passphrase parameter

How do you pass a passphrase via the GPG command-line? Even when the "--passphrase" parameter is used, the GNOME agent still pops-up.

People have suggested a "--no-agent", but this isn't a valid option. You might be able to set this via the config-file, but this isn't a valid approach for me. I can't use a pipe, because I'll have data on STDIN.

Upvotes: 0

Views: 330

Answers (1)

Dustin Oprea
Dustin Oprea

Reputation: 10266

It's "--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

Upvotes: 0

Related Questions