2
I'm getting an error in decrypting .gpg file. I've already imported the public keys through below method.
$gpg --import key1.asc
directory `/user_home/.gnupg' created
gpg: new configuration file
`/user_home/.gnupg/gpg.conf' created
gpg: WARNING: options in `/user_home/.gnupg/gpg.conf' are not yet active during this
run
gpg: keyring `/user_home/.gnupg/secring.gpg' created
gpg: keyring `/user_home/.gnupg/pubring.gpg' created
gpg: /user_home/.gnupg/trustdb.gpg: trustdb created
gpg: key 3CDDKLPD: public key imported
gpg: Total number processed: 1
gpg:imported: 1 (RSA: 1)
$gpg --import key2.asc
gpg: key 4F23B654: public key imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
$gpg --list-public-keys
/user_home/.gnupg/pubring.gpg
pub 2048R/3CDDKLPD
uid
pub 2048R/4F23B654
uid
$gpg --decrypt myfile.txt.gpg
gpg: encrypted with 2048-bit RSA key, ID 4F23B654, created 2010-07-11
gpg: decryption failed: No secret keykey
This error occurs though so, can someone help determine why this is happening? I will appreciate it.
per this, you may have failed to import the secret keys from the old keyring: http://stackoverflow.com/questions/91355/gnupg-decryption-failed-secret-key-not-available-error-from-gpg-on-windows
– Frank Thomas – 2015-12-04T17:33:50.217Who did crypt the message, your self? As far I understand, the message was crypted with the public key, and only the owner of the private key will be able to read the message. – Mathieu – 2015-12-04T17:34:20.057
FYI, it appears he is decrypting a file rather than a message by the way. I edited the question to put the error detail in a more readable format to help as well. Once approved you'll see it that way as well. – GambleNerd – 2015-12-04T19:10:53.343