10

I used to use Kleopatra on an old Windows XP machine. The hard drive of the aforementioned computer was transferred into an external enclosure and is available; GPG4Win version 2.0.1 was on that machine.

The new computer is running Windows 7 Home Premium and has GPG4Win 2.1.0 installed on it. And I can only download my public key from off the public key server, of course.

How do I transfer the Kleopatra PGP GPG private keys from the old hard drive to the new computer?

2 Answers2

9

I realise that this is a very old post but I am providing an answer in the hope that someone may find it useful.

On a Windows PC, GPG stores its keys (both public and private) in %appdata%\gnupg (e.g. C:\Documents and Settings\myusername\Application Data\gnupg). So, just drag the secring.gpg file from that folder onto the window of your currently installed version of Kleopatra and select the 'Import Certificates' option.

TheRogueWolf
  • 339
  • 1
  • 3
  • 6
4

This trick from 2009 worked for me in 2021: https://lists.gnupg.org/pipermail/gnupg-users/2009-January/035373.html

Assuming you don't have any keys in the new system that you need to keep, you can just copy over the old gnupg directory from the original system and overwrite your current directory. On a Windows 10 desktop in 2021, the gnupg directory is located in c:\Users\username\AppData\Roaming\gnupg. If you do have new keys you need to keep, you should probably use Kleopatra's Export function and save them someplace you can import them from later.

I made sure Kleopatra wasn't running and then just overwrote my new folder with the old one, then re-opened Kleopatra and there were all my old keys. I confirmed I was able to decrypt files that had previously been encrypted from the old system. All is good.