gpg: Oops; keylost!

David Shaw dshaw at jabberwocky.com
Thu Mar 3 14:40:09 CET 2005


On Thu, Mar 03, 2005 at 01:14:45PM +0000, James Davis wrote:
> David Shaw wrote:
> 
> >Yep.  You have a secret key in your public keyring.  Note the first
> >line after the "key lost" message.
> >  
> >
> What should I do to delete it? Sorry I'm quite new to gnupg.

There are a number of ways to fix it, but before we try those, can you
try this:

gpg --no-default-keyring --keyring ./fixed-pubring.gpg --secret-keyring ./fixed-secring.gpg --import /path/to/your/broken/pubring.gpg

If that works, you should end up with two new files:
fixed-pubring.gpg contains the public keys, and fixed-secring.gpg
contains the secret keys.

Then you can --import the fixed-secring.gpg file to put the secret key
where it belongs, and replace your pubring.gpg with fixed-pubring.gpg
to put the public keys where they belong.

David



More information about the Gnupg-users mailing list