decryption failed: secret key not available

Collings, David H. CollingsDH at
Wed Feb 11 23:21:00 CET 2009

I've seen similar issues in some other posts, but still am unclear as to
how to resolve my issue.
I am trying to run a script to decrypt a file automatically from our job
scheduler (UC4).
I am able to run the script from the command prompt or by executing the
.bat file from the server.  I've used a number of variations to pass in
the passphrase from a file, etc and they all work fine from the command
However when I attempt to run the script from the scheduler I get an
error that the secret key is not available:

	gpg: encrypted with ELG-E key, ID 5D969323
	gpg: decryption failed: secret key not available

I am able to encrypt files using a script from the job scheduler, but
apparently running in this way the secret key can be located for
In another similar posting I found the response:

	"It's not a question of the passphrase; rather, the key isn't
	If it works from the command line but not from the scheduled
job, then
	I'd check for differences in the environment.  Possibly you have
	different GPG home directories when run in your two different
	Check for different GNUPGHOME variables as well as different
	directories for your different run methods."

This was the end of the post, so I'm not sure of the resolution to it.
I googled how to check the home variable and I don't see that any are
set up on the server, other than the PATH location.  This appears to be
an environmental issue, but not sure how to proceed towards a fix at
this point.
Thanks for any help,
Dave Collings
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20090211/a4bee692/attachment.htm>

More information about the Gnupg-users mailing list