How to silence gpg-agent?

Jochen Saalfeld jochen at intevation.de
Wed Mar 16 09:19:02 CET 2016


Hi Dahsamir,

I digged the code a bit and found, the piece of code. As you already assumed 
correctly, the trust-db is checked periodically, if 
the --no-auto-check-trustdb option is not set, and a log output is made, when 
the option --quiet is not set (./g10/trustdb.c:970), but the validate 
function is always called. So setting --quiet will just silence the 
otuput "gpg: checking the trustdb". If you dig a bit deeper in the validate 
function (./g10/trustdb.c:2057), you'll see that the logging output about the 
validation is always done and it doesn't care about any flag.

You can redirect the log output to a file with the --logger-fd option. You 
still have the output from the trustdb check, but maybe its easier to parse 
it from a file, then from the stdin.

Kind regards
Jochen


Am Mittwoch 16 März 2016 08:11:32 schrieb Dashamir Hoxha:
> On Wed, Mar 16, 2016 at 7:30 AM, Dashamir Hoxha <dashohoxha at gmail.com>
>
> wrote:
> > On Wed, Mar 16, 2016 at 4:58 AM, NIIBE Yutaka <gniibe at fsij.org> wrote:
> >> On 03/16/2016 06:06 AM, Dashamir Hoxha wrote:
> >> > I have a problem that time after time I get output like this, which is
> >> > somewhat unrelated to the operation performed and a bit confusing:
> >> >
> >> > ----------
> >> > gpg: checking the trustdb
> >> > gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
> >> > gpg: depth: 0  valid:   1  signed:   3  trust: 0-, 0q, 0n, 0m, 0f, 1u
> >> > gpg: depth: 1  valid:   3  signed:   0  trust: 2-, 0q, 0n, 0m, 1f, 0u
> >> > gpg: next trustdb check due at 2017-01-05
> >> > ----------
> >> >
> >> > I believe that it comes from gpg-agent. I have tried to silence it,
> >>
> >> using
> >>
> >> > the option '--quiet', but it seems not to work. Any idea what else I
> >> > can try?
> >>
> >> It is not gpg-agent which outputs this message, but gpg frontend
> >> itself, as it says "gpg:".  GnuPG checks trustdb periodically.
> >>
> >> You can stop it by --no-auto-check-trustdb option.
>
> Actually, there is no problem if GnuPG checks trustdb periodically, I just
> don't want it to spill the output on stdin. Maybe it can do it silently, or
> maybe it can record the output on a log file. What options can I use for
> this?
>
> > Maybe you are right, I will try this option.
> > The problem is that this happens time after time, so I cannot be sure
> > immediately that it solved the problem. I have to wait and see what
> > happens.
> >
> > Thanks,
> > Dashamir


-- 
jochen at intevation.de | intevation.de/ | 0541335083214 | PGPkey: 0x64B67DF4
Intevation GmbH, Neuer Graben 17, 49074 Osnabrueck - AG Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20160316/e521c4ba/attachment-0001.sig>


More information about the Gnupg-users mailing list