April 6, 2018 at 5:02 pm
Hi All,
I am trying to automate pgp decryption using SSIS. The file was encrypted using "Kleopatra". I am using "Execute Process Task" to call the gpg.exe. But I cannot get rid of the popup window asking me to enter the passphrase. Does anyone know how to automate the passphrase into the process?
My Executable: C:\Program Files (x86)\GnuPG\bin\gpg.exe
I have tried all following arguments but none works for me. Each one of them asks me to enter the passphrase in a pop up window.
1. --batch --passphrase <mypassphrase> --output <Fully qualified destination location> --decrypt <fully qualified source location>
2. --batch --passphrase-file <fully qualified passphrase file location> --output <Fully qualified destination location> --decrypt <fully qualified source location>
3. --batch --passphrase-fd 0 --output <Fully qualified destination location> --decrypt <fully qualified source location> .....In this case I supplied the passphrase through "StandardInputVariable". And I tried both entering passphrase value directly in the variable and also saving the passphrase in a file and entering the location of the file to the variable
4. echo <mypassphrase> | gpg --batch --yes --passphrase-fd 0 --output <Fully qualified destination location> --decrypt <fully qualified source location>
April 9, 2018 at 7:25 am
You might be able to use the command window (cmd.exe) to run the command:
echo thisismypassphrase | C:\YourPath\gpg.exe --option1 --option2 ...
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
April 9, 2018 at 10:04 am
sgmunson - Monday, April 9, 2018 7:25 AMYou might be able to use the command window (cmd.exe) to run the command:echo thisismypassphrase | C:\YourPath\gpg.exe --option1 --option2 ...
The GPG documentation points to using something like this (one or the other):
gpg --batch --passphrase-file passphrase.txt --output "OUTPUT.CSV" --decrypt "OUTPUT.CSV.pgp"
gpg --batch --passphrase-fd 0 --output "myoutput" --decrypt "myencryptedfilename" < echo mypassphrase
Note: the batch option is required to not have the UI prompt come up.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
April 9, 2018 at 11:01 am
sgmunson - Monday, April 9, 2018 7:25 AMYou might be able to use the command window (cmd.exe) to run the command:echo thisismypassphrase | C:\YourPath\gpg.exe --option1 --option2 ...
Thank you for the reply sgmunson but it did not work and still gave me pop up window.
April 9, 2018 at 11:02 am
Matt Miller (4) - Monday, April 9, 2018 10:04 AMsgmunson - Monday, April 9, 2018 7:25 AMYou might be able to use the command window (cmd.exe) to run the command:echo thisismypassphrase | C:\YourPath\gpg.exe --option1 --option2 ...
The GPG documentation points to using something like this (one or the other):
gpg --batch --passphrase-file passphrase.txt --output "OUTPUT.CSV" --decrypt "OUTPUT.CSV.pgp"
gpg --batch --passphrase-fd 0 --output "myoutput" --decrypt "myencryptedfilename" < echo mypassphraseNote: the batch option is required to not have the UI prompt come up.
Thank you for the reply Matt but both option still prompts me to enter password.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply