Page MenuHome GnuPG

Some way to suppress message "You need a passphrase to unlock the secret key..."
Closed, ResolvedPublic

Description

quinn@tao-2:~$ gpg --quiet --no-verbose --status-file /dev/null --logger-file
/dev/null --decrypt file.asc 2>/dev/null

You need a passphrase to unlock the secret key for
user: "Nobody (comment) <nobody@example.com>"
4096-bit ELG key, ID ED9836B8, created 2009-05-12 (main key ID xxxxxxxx)

[decrypted file contents...]

As far as I can tell from half an hour of web searches, man page inspection, and
adding options like --quiet and --status-file /dev/null, there is *no* way to
suppress the message:

You need a passphrase to unlock the secret key for
user: "Nobody (comment) <nobody@example.com>"
4096-bit ELG key, ID ED9836B8, created 2009-05-12 (main key ID xxxxxxxx)

I wrote a CLI wrapper to grep encrypted files, and this info junks up its
output. It would be nice if I didn't have to see it.

Please correct me if there's a way to suppress this output and I just failed to
find it.

Thanks.

Details

Version
2.0.10

Event Timeline

quinn set Version to 2.0.10.
quinn added a subscriber: quinn.

The options --batch or --no-tty will help you.

quinn claimed this task.

Thanks, that did it.