gpg spams the terminal with passphrase message

Bug #190294 reported by Bogdan Butnaru
4
Affects Status Importance Assigned to Milestone
GnuPG
Fix Released
Unknown
gnupg (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: gnupg

For some reason gpg insists on spamming the console with this useless message:
-------
$ gpg --quiet --no-use-agent --sign --passphrase XXX -u "YYY" --output SIG FILE &> /dev/null

You need a passphrase to unlock the secret key for
user: "YYY"
1024-bit DSA key, ID FFD40F72, created 2007-12-01

--------
This is despite the fact that:
a) the passphrase is given on the command line (yeah, I know, it's OK here)
b) I told it to be quiet
c) I told it not to use the agent
d) I redirected both outputs to /dev/null
e) it doesn't actually _ask_ for the password (see point a) and the signing works.

I don't even know _how_ it does that with the outputs redirected. Anyway, this is really annoying in scripts.

Revision history for this message
Andreas Moog (ampelbein) wrote :

Don't know if this should be considered a bug after all, but adding --batch does the trick:

gpg --quiet --no-use-agent --batch --sign --passphrase XXX -u "YYY" --output SIG FILE &> /dev/null

Daniel T Chen (crimsun)
Changed in gnupg:
importance: Undecided → Low
status: New → Confirmed
Changed in gnupg:
status: Unknown → New
Changed in gnupg:
status: New → Incomplete
Changed in gnupg:
status: Incomplete → Confirmed
Revision history for this message
Thijs Kinkhorst (kink) wrote :

--batch is indeed the intended way to go here. Discussion with upstream concluded that it's just not worth fixing the case where --batch is left out.

Changed in gnupg (Ubuntu):
status: Confirmed → Invalid
Changed in gnupg:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.