gpg --verify in batch mode / how to require a trust level?

Ingo Klöcker kloecker at
Tue Jan 18 18:49:50 CET 2022

On Dienstag, 18. Januar 2022 15:59:11 CET Bernd Graf via Gnupg-users wrote:
> How can I require `gpg --verify` to only accept keys from my keyring
> with a certain trust level and fail otherwise (rc!=0)
> Alternatively, how can I check that a signature was done with a specific
> key?

Use gpgv instead of gpg. It's much more lightweight and specifically meant for 
signature verification. In particular, you can pass it a keyring that only 
contains the keys you want:

$ gpgv --keyring FILE backup.tar.sig backup.tar

For details
$ man gpgv

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the Gnupg-users mailing list