[Gpg4win-users-en] GPG Encryption Fails When Called From Oracle Enterprise Manager
aheinecke at intevation.de
Tue Jul 7 18:10:37 CEST 2015
On Tuesday, July 07, 2015 03:52:51 PM Kent Hurtig wrote:
> I have created a batch job that encrypts a file using GnuPG software. When
> I run the batch file from the server where the file resides, it runs
> successfully and encrypts the file. When I run the batch job through
> Oracle Enterprise Manager(the software that we schedule our batch jobs
> through), the task which encrypts the file using gpg encounters several
> issues. I have attached the output from this task.
Not serveral issues, Just one:
gpg: E:\\Test\\ECSI_Perkins_Loan_Test\\TESTbldpromIG.csv: encryption failed:
No public key
> I should mention that
> I previously had the same issue on our old "Media" windows server 2003. To
> correct the issue, I changed the gpg command to be more verbose and saw
> that the process was being ran as the default user and not as user
> aunt_bee. I copied the gpg.conf, pubring.gpg, secring.gpg, trustdb.gpg
> and trust.gpg.lock from C:\Documents and Settings\aunt_bee\Application
> Data\gunpg to C:\Documents and Settings\Default User\Application Data\gnupg
> on Media, reran the Oracle Enterprise Manager job and it finished
For encryption gnupg needs to find the public key of the recipient. This key is
contained in pubring.gpg.
GnuPG looks for this file by default in %APPDATA%\gnupg
This apperantly expands in your environment to:
To change this you can add --homedir <path_to_gnupg_homedir> and gnupg will
then look in that directory for the keyring.
-> Create a directory c:\gnupg
-> Copy the pubring.gpg (and gpg.conf if you have options in there) into that
-> extend your command to include --homedir c:\gnupg in the arguments.
Now as long as that Batch user has read access to c:\gnupg this should work.
Andre Heinecke | ++49-541-335083-262 | http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: This is a digitally signed message part.
More information about the Gpg4win-users-en