secret key not available

Jonas Hedman jonas.hedman at
Wed Jun 1 22:19:10 CEST 2016

On 16-06-01 21:14:16, DODDI ANTHONY BALARAJU cs15d008 wrote:
>  hI,
> <>
> I'm new to this GPG usage. I dont need any internals. I am running a shell
> script in which following line causes error :
> gpg --yes --sign message.txt
> It shows the following error:
> gpg: no default secret key: secret key not available
> gpg: signing failed: secret key not available
> How can I solve this error, without modifying the command? (do I need to
> change any settings). I am using gpg version (GnuPG) 1.4.16
> >which gpg
> is giving the output
> /usr/bin/gpg
> I Tried with --default-key <something>
> Still it dint work!!
> Any suggestion to get past this error will be greatly helpful.
> Thank you

Did you generate a key? (gpg --gen-key) 

Jonas Hedman 

XMPP:        nstr at
PGP Key:     0x5c3989e0616bb08c
Fingerprint: 8F72 C5BE AAFA B4BA 8F46  9185 5C39 89E0 616B B08C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Digital signature
URL: </pipermail/attachments/20160601/1a3471ba/attachment-0001.sig>

More information about the Gnupg-users mailing list