Refreshing keys

Peter Lebbing peter at
Tue Jul 2 21:08:16 CEST 2013

On 02/07/13 19:16, John Clizbe wrote:
>     gpg --check-sigs| grep "User ID not found"|cut -b 14-21| sort -u| \
> 	xargs gpg --recv-keys

Hmmmmm.... that can't be right, can it? --check-sigs normally doesn't complain
about missing User IDs. I think it should be --list-sigs.

Also, I think this is the (more robust) version with --with-colons:

gpg2 --with-colons --list-sigs|grep '^sig.*User ID not found'| \
cut -d: -f 5|sort -u|xargs gpg2 --recv-keys

I tried to do something about funny people using the literal text "[User ID not
found]", but this is simply indistinguishable in the output of gpg2, so scratch
that :).

If it /would/ have beeen distinguishable, this would have been better:

gpg2 --with-colons --list-sigs|awk -F: \
'$10 == "[User ID not found]" { print $5 }'|sort -u|xargs gpg2 --recv-keys

But since this doesn't help, I also dropped the explicit field number 10
reference in favour of the simpler command above.



PS: Any occurence of gpg2 can be replaced by gpg. I just try to learn myself to
use gpg2 unless I have specific need for v1.

I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at <>

More information about the Gnupg-users mailing list