keydb_search failed: Invalid argument

Daniel Kahn Gillmor dkg at
Fri Jun 4 02:43:25 CEST 2021

On Thu 2021-06-03 09:43:02 +0900, NIIBE Yutaka wrote:
> ಚಿರಾಗ್ ನಟರಾಜ್ wrote:
>> I'm getting this error/warning even when I just decrypt an encrypted
>> file using plain gpg.
> If you keep using ~/.gnupg/pubring.gpg, I think this is the cause of
> your problem.
> In this case, see this comment in the bug tracker of GnuPG:
> To excerpt the solution from the comment, it's:
> --------------------------
> cd ~/.gnupg
> gpg --export-options backup --export >allkeys.gpg
> mv pubring.gpg pubring.gpg-saved
> gpg --import-options restore --import <allkeys.gpg
> rm allkeys.gpg
> --------------------------
> -- 

In debian, we also ship a script
/usr/bin/migrate-pubring-from-classic-gpg which should perform a similar
approach (though it doesn't use the more recent mechanisms of
"--export-options backup"/"--import-options restore").

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <>

More information about the Gnupg-users mailing list