Execute Process Task and GPG

  • I'm trying to decrypt GPG files in a package and whenever the package is started via the SQL server agent it fails. I am able to run the package and decrypt the files successfully when I execute the package through SSIS.

    Executing the process "C:\WINDOWS\system32\cmd.exe" with the arguments "/C gpg --passphrase-fd 0 -o "Z:\\decryptthisfile.txt" --batch --decrypt "Z:\\decryptthisfile.txt.gpg" < G:\Configuration\key.txt". Z:\ is a mapped drive created at the beginning of the package.
    G:\ is a local drive.

    The job is running through a job proxy using a domain account (administrator). When I execute the job in SSIS, I am logged in as administrator.

  • I've been using GnuPG within a BAT file in an execute process task within SSIS to perform encrypt/decrypt operations. i.e.

    Example BAT file:

    @echo off

    gpg --encrypt -r "someone@somekey.com %1

    Example Execute Process Task:

    Executable: Z:\GNA\OUTGOING\GnuPG\GNA-EXPORT-ENCRYPT.BAT

    Supply the arguments for the BAT file as an expression, i.e.

    @[User::varWorkPath] + "\\" + @[User::varFileName]

    Note: Whatever you account you use to import your keys, etc. in GnuPG you will need to configure this account as an execution account.

    Tommy (freebsdboy@gmail.com)

  • Thanks Tommy.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply