1

I have a GPG public/private key to send email with Enigmail and Thunderbird. I received an encrypted email but Enigmail did not recognize it. I tried to use the command line, but gpg complains gpg: decryption failed: secret key not available. I imported the public key that was sent with the mail. I thought maybe the Cygwin gpg was using a different home directory than Windows programs, so I tried

$ gpg --homedir  /cygdrive/c/Users/Chloe/.gnupg --list-secret-keys

And it showed nothing. So where is the secret key that it is asking for?

$ ls -l /cygdrive/c/Users/Chloe/.gnupg
total 40
-rw-r-x---+ 1 Chloe None 9188 Mar 30  2015 gpg.conf
-rw-rwx---+ 1 Chloe None 9956 Mar 30  2015 pubring.gpg
-rw-rwx---+ 1 Chloe None 9956 Mar 30  2015 pubring.gpg~
-rw-------+ 1 Chloe None    0 Mar 30  2015 secring.gpg
-rw-------+ 1 Chloe None 1200 Mar 30  2015 trustdb.gpg
Arminius
  • 43,922
  • 13
  • 140
  • 136
Chloe
  • 1,668
  • 3
  • 15
  • 30
  • You speak about importing public keys when asked for the secret keys -- you are aware of the difference between them and when which one is required? – Jens Erat May 04 '17 at 20:49
  • The public key was included in the message. You can copy & paste it into `gpg` to import it. I still could not find where my secret key is located. I need my secret key to decrypt the message. – Chloe May 05 '17 at 20:39

1 Answers1

3

GnuPG on Windows (unless a copy installed from cygwin/Baboon, which obeys the standard ~/.gnupg path of the unixoid versions) has its home directory in %APPDATA%\gnupg, (usually) expanding to C:\Users\<username>\AppData\Roaming\gnupg since Windows Vista (a slightly different path for earlier versions of Windows).

This should translate to following path in cygwin:

$ gpg --homedir  /cygdrive/c/Users/Chloe/AppData/Roaming/gnupg --list-secret-keys
Jens Erat
  • 23,446
  • 12
  • 72
  • 96