keydb_search failed: Invalid argument

Daniel Kahn Gillmor dkg at fifthhorseman.net
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:
>
> 	https://dev.gnupg.org/T5409#145906
>
> 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").

           --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20210603/9a941baf/attachment.sig>


More information about the Gnupg-users mailing list