Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
586 views
in Technique[技术] by (71.8m points)

gnupg - SSIS PGP decryption - How to enter Passphrase without the popup window?

I have a file with pgp encryption. I want to decrypt the file using SSIS. Whenever I run the package it prompts me to enter passphrase. How can I bypass this?

I'm using execute process task to run the decrypt command from command prompt.

C echo XXXXXXXXX|gpg --keyring "\LSRSQL08ShareDataServices_Keypublic.pgp" --secret-keyring "\LSRSQL08ShareDataServices_Keyprivate.pgp" --batch --yes --passphrase-fd 0 -o \LSRSQL08ShareWorkingFoldersACXMDataLoadRazor_FEB21_Install.txt -d \LSRSQL08ShareWorkingFoldersACXMRazor_FEB21_Install.txt.pgp

I have extracted public and private key like below:

gpg --output public.pgp --armor --export [email protected]
gpg --output private.pgp --armor --export-secret-key [email protected]
question from:https://stackoverflow.com/questions/65950131/ssis-pgp-decryption-how-to-enter-passphrase-without-the-popup-window

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Below command worked for me. Just we need to make sure that we import the key in same account under which SSIS package will be running.

--pinentry-mode=loopback --passphrase XXXXXX  -o \LSRSQL08ShareWorkingFoldersACXMDataLoadRazor_FEB21_Install.txt -d \LSRSQL08ShareWorkingFoldersACXMDataLoadRazor_FEB21_Install.txt.pgp

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...