Mailing List Archive

How to avoid weird mestage on file deciphering
Hi.

I am trying to do a script that has `gpg --decrypt`.
This is what I am getting:

LC_ALL=C gpg --decrypt ~/file.gpg
gpg: encrypted with RSA key, ID 0x0000000000000000
gpg: anonymous recipient; trying secret key 0x2D3C49A28079BBBD ...
gpg: anonymous recipient; trying secret key 0xB8A344FF3684F216 ...
gpg: anonymous recipient; trying secret key 0x60E8A97AEB2F2DB9 ...
gpg: okay, we are the anonymous recipient.
asdf

I want to avoid all the messages and only output "asdf" (the content of
the file). How can I do this with gpg?

I have tried some variations, but I always get this "gpg: anonumous
recipient" message (that I want to avoid).

My key is on a Yubikey. Don't know if this matters for this issue.

Thanks.


_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: How to avoid weird mestage on file deciphering [ In reply to ]
Notifications, warnings and errors are sent to stderr (rather than
stdout), so the solution for bash would be:

$ gpg --decrypt file.txt.gpg 2> /dev/null

Regards
Stephan
Re: How to avoid weird mestage on file deciphering [ In reply to ]
On Fri, 10 Nov 2023 13:48, Stephan Verbücheln said:
> Notifications, warnings and errors are sent to stderr (rather than
> stdout), so the solution for bash would be:
>
> $ gpg --decrypt file.txt.gpg 2> /dev/null

Or to suppress the specific diagnostics mentioned but still show
important error message use

gpg -q ...

or

gpg --quiet ...



Salam-Shalom,

Werner


--
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein