I generated a keybundle by gpg --key-gen. How can I find this keys and import them to thunderbird enigmail now? And shouldn't enigmail find them by itself? It only imported the public key.

I looked in ~/.gnupg. There is a folder called private-keys-v1.d. inside there are a lot of *.key files. But when I use enigmail/key management/file/import keys it cant read this files. It wants to have *.gpg files.

There is also a secring.gpg file inside ~/.gnupg. I tried to import this one but nothing happens.

Enigmail did find and include automatically the public keys of the new generated keyrings, but not the private key, which I cant find for now.


Try exporting your private key in the ASCII-armor format instead of binary (asc). This worked for me whereas trying to import the .asc file did nothing.

Find your keyID from the list of keys:

gpg --list-keys

To export your private key:

gpg --armor --export-secret-key keyID > mykey.gpg

Or, if you already got a .asc file you can simply convert it:

gpg --enarmor < mykey.asc > mykey.gpg

Then import the mykey.gpg file in the enigmail key manager.

| improve this answer | |

You will need to export the private and public key using gpg to asc form using:

gpg --list-keys

This will list your gpg keys. Note down the keyIDNumber.

In order to export a private key:

gpg --export-secret-keys keyIDNumber > exportedKeyFilename.asc

In order to export a public key:

gpg --armor --export your@email.address

Then you can import in Enigmail using Enigmail key manager. Moreover you will need also the public key of the counterparty and import it using key manager. In the keymanager you can also import key using key server, if the counerpart has uploaded it to the server. One common mistake is that you will need to enable pgp usage as an option in the email account settings. Then you can check the encrypt and sign settings before sending your message.

| improve this answer | |
  • I didn't ask how pgp works or how to use it :) My question is where gpg stores the private key. Assumably in ~/.gnupg but I cant import it to enigmail from there. – user577728 Feb 1 '17 at 12:46
  • You can generate the keys directly in enigmail using wizard. To search the key type in nautilus private or public. In the key name should be public or private. – kukulo Feb 2 '17 at 7:12
  • I updated my question, I may have found the keys but cant import them. Cant anybody explain the key-file structure that is generated by gpg --key-gen? – user577728 Feb 2 '17 at 22:45
  • updated the answer – kukulo Feb 3 '17 at 17:01
  • still doesn't work. When I import the exported.asc to enigmail, simply nothing happens. Even when I restart thunderbird. I have listed the public key in enigmail but it didnt get fat (like it should when the private key is available here too) – user577728 Feb 5 '17 at 11:52

Your Answer

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