Cannot create new key pair in Kleopatra after deleting everything

Ok, so I had created multiple key pairings successfully and was communicating just fine for weeks. I’m dumb, I ended up having somebody tell me they couldn’t communicate because they were using an older version and I fucked up everything.

Long story shot, I went into Kleopatra and highlighted all my key pairings and just pressed delete. Thinking I could create a new one and just start from scratch. Well now I get an error when I try to create a backup and the key that is created doesn’t even show up in Kleopatra.

I know I’m probably barely making sense, I will attach a screenshot of the error I am getting. Did not have this issue before.

This is the screenshot I meant to upload…


It appears that I just cannot create new certificates for some reason, they aren’t showing up in Kleo. This is driving me absolutely nuts.

Hi Steve,

usually you should have a backup from important files of your computer.
If you do, you should be able to just use the files from the last backup
(that should be in %APPDATA%\gnupg for a standard setup).

Otherwise what you describe could be defect, because you should be able to just create new keypairs after deleting all of them. See Command line operations at and try there to list all pubkeys with some more diagnostic settings, e.g. try
gpg -v --list-keys
to see what it tells you.
If this works, try more command line operations, this is the technical way to see if the backend is operating properly, and it can sometimes give better diagnostic messages.

Best Regards,

I agree with Bernhard. The error message comes when there was a very unexpected error generating the key. We should show a better error in that case.

As Bernhard said I would also recommend to open the command line (cmd.exe) and enter

“gpg --gen-key” there and follow the instructions. This should give you more information.

Thanks for the responses guys. I uploaded a screen shot of what I’m seeing when I follow your instructions. Does this look correct?

I know that I’m not helpful, as I am not all that technical. There is a folder called “openpgp-revocs.d” where new files are being places that looks like a fingerprint maybe which would correspond to a certificate (does that make sense?).

If this is working as intended how would I go about retrieving my public and private keys when using the cmd lines?

I really do appreciate your patience

cmd line pgp.png

Sorry If I shouldn’t double post, Idk if it will let me upload 2 files on one post.

cmd line 2.png

This is not working as intended. You have the bad luck to run into a very rare issue. Our development ticket for this is:
I will mention that you have also seen this issue in the report.

All will be fixed if you start from scratch:

  • Restart your Windows to ensure that all gnupg related processed are shut down.
  • Rename %APPDATA%\gnupg to %APPDATA%\gnupg_bkp
  • Start Kleopatra and generate a new keypair

(%APPDATA% expands to something like c:\users\steve\AppData\Roaming )

I will look into this when I get home later, thanks for the responses guys!

Worked like a charm! Thank you very much!