Decrypting with private key and public key is missing

David Shaw dshaw at
Thu Oct 16 02:36:36 CEST 2008

On Oct 15, 2008, at 4:54 PM, Guru_i wrote:

> Hi Im using GPG CL 1.4.9.
> case is -
> 1)somebody (trusted) is generating key pair on my behalf(as proxy).  
> But he
> is sending me only my secret key and NOT public key.
> 2) I was able to import the secret key in gpg keyring using
> --allow-secret-key-import command
> 3) But when I try to decrypt the file (which was encrypted using my  
> public
> key its not with me though) I get error message such as
> gpg: decryption failed: secret key not available. Though I know I have
> secret key with me.

There is a lot that doesn't follow here.  The --allow-secret-key- 
import command is a no-op in version 1.4.9, so if you had to use it to  
import your key, then you're not using 1.4.9.

Also, if you were using 1.4.9, when you imported your secret key, it  
would automatically create a public key for you.  This is built in,  
and is on by default.

Finally, that error message means that your secret key was not, in  
fact, imported.  It says nothing about your public key.

Given all of that, I suspect you didn't import your secret key after  

To import a secret key, do:
    gpg --import (the secret key file)


More information about the Gnupg-users mailing list