Help! Please with decryption failed: No secret key (gpg in batch mode)

Raimar Sandner mail at 404not-found.de
Wed Apr 29 17:36:49 CEST 2009


> I have to use GnuPG in batch mode to enable a running process to decrypt
> encrypted file. If I run the shell script through ssh (with the specific
> user that was previously used to set the keys and has its proper .gnupg
> directory) this works fine despite the following warning: WARNING: message
> was not integrity protected.
> But if I have the running process invoking the very same script, the
> response is: gpg: encrypted with RSA key, ID 911633C3
> gpg: decryption failed: No secret key
> I have then tried to modify the script to define home directory using
> --homedir and I got the following: gpg: WARNING: unsafe permissions on
> homedir `/home/superagt/'"

If the secring.gpg containing your secret key lies in /home/superagt/.gnupg 
then you should use --homedir /home/superagt/.gnupg, but I suspect this is not 
the correct path to your secret key, right?

> gpg: keyring `/home/superagt//secring.gpg' created
> gpg: keyring `/home/superagt//pubring.gpg' created
> gpg: encrypted with RSA key, ID 911633C3
> gpg: decryption failed: No secret key
> It is to note that I see neither in /home/superagt/ nor in
> /home/superagt/.gnupg/ the secring.gpg pubring.gpg announced. Thanks per
> advance for your help and support.

Where lies the secret key you are trying to use? Is the script executed by the 
same user who has access to the secret key?

Raimar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20090429/848f6c3b/attachment.pgp>


More information about the Gnupg-users mailing list