1

I posted this originally on stackoverflow, but was told that it was offtopic and this would be the better place to post it, so I am reposting it here and deleting my original topic.

I have a rather old PGP key, but I've long ago lost the private key for it, so I'm trying to generate a new key with GPG on Windows 7. While it technically generates the key, GPA crashes every time I generate the keypair. I've tried this four times now and just downloaded what appears to be the latest version of Gpg4Win and am still receiving this problem. A comment on my original post informed me that GPA crashes is not a very good description of the problem, but unfortunately I can't do much better than that: all it tells me is "gpa.exe has crashed and will close now", I don't get an error dump or anything.

Is there anything I can do to fix this, or is this just a bug in the latest version of Gpg4Win? Here are the specs of GPG that I'm using: GPA 0.9.4. GnuPG 2.0.22. My operating system is Windows 7 64 Bit, and I have 5 GB of RAM.

Also, I was told to try generating the keypair on the command line but can't find any documentation for how to do this in Windows 7. If anyone could link me to current documentation for this, that would be a good workaround for solving this problem.

  • Gpg4win supports windows 7 platform only since version 2.1.0. Try out in the latest version (2.2.1) gpg4win.org/download.html – Karthik Bose Jun 2 '14 at 4:28
  • Thanks Karthik Bose. I thought I had the latest version, but clearly I was mistaken. I will try that the latest version and see if it works. – Evan Lynch Jun 2 '14 at 4:58
  • Actually, it looks like I do have the latest version. I reinstalled, tried again, and it still crashed. It looks like half my RAM is being used normally, even without trying to generate a GPG key. Is that likely the cause, would GPG need more than 2.5 GB of RAM to generate the keypair? – Evan Lynch Jun 2 '14 at 23:39
  • Doesn't look like RAM is the issue, unless it just flat out needs more than 5 GB of RAM to generate a key pair, which would be ridiculous. I closed a bunch of programs and tried to generate a keypair again. It showed me the spinning wheel for a lot longer this time, which is presumably progress, but it still eventually crashed. Unless I need to avoid using any programs while it's running, I'm out of ideas on what else to try. – Evan Lynch Jun 3 '14 at 0:23
0

I had the same problem, so I tried to create the keypair from the command line. When I did, I encountered the same problem again but with the following information.

gpg: lookup_hashtable failed: Unknown system error
gpg: trustdb: searching trust record failed: Unknown system error
gpg: Error: The trustdb is corrupted.
gpg: You may try to re-create the trustdb using the commands:

To fix this problem, go to the command line and type the following (please change your-username to your actual username).

cd C:\Users\your-username\AppData\Roaming\gnupg
gpg --import-ownertrust < otrust.tmp
del trustdb.gpg
gpg --import-ownertrust < otrust.tmp

After that you should be able to successfully generate a new key pair.

This worked for me using kleopatra 3.02-gpg4win-3.0.3

  • I'm quite impressed to receive an answer to a question this old. I had forgotten about posting this. I haven't tried your solution but I did some googling and it looks like it'd work so I'm giving you credit since you actually do it with GPG instead of Kleopatra like I did. – Evan Lynch Apr 5 '18 at 5:32
0

I just thought I'd post an update since I was finally able to get a working GPG key created, just now. I did it by using Kleopatra instead of GPA. I feel like it's pretty non-intuitive to be forced to use Kleopatra instead of GPA because GPA keeps crashing. I'm going to leave this one open for a while in case someone has a solution / workaround for creating keys with GPA instead of Kleopatra, as I'd be quite curious to hear it.

This feels like a bug to me that you can't create GPG keys in GPA without it crashing, and have to instead create certificates with Kleopatra. Mostly, I just wanted to update this in case anyone else is having this same problem, so that they'll be able to see how I solved it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.