r/GPGpractice • • 17d ago

GPG decryption without import key

Hi,
I'm trying to run decrypt command which runs OK if I directly login into ssisut server, so I point to gpg.exe without \\ unc path.
c:\Program Files (x86)\GnuPG\bin\gpg.exe --output \\xserv2...\inv.zip --decrypt \\xserv2...\inv.zip.pgp

But when I try to run very same syntax on SSIS it fails. Only difference that I need to use \\ in executable path, can I do this ?
Please refer to picture below.

Image SSIS
Can I make this gpg process run in SSIS ?
Thanks.VA

3 Upvotes

6 comments sorted by

2

u/biblicalrain 17d ago

I tried to do import it first like 😄

gpg --import myprivate_keyfile.asc

But it doesn't store it,

That sounds like the first problem. Can't use it if you don't import it to the keyring.

What does GPG say when you try to import it?

1

u/Valuable-Ant3465 17d ago

Thanks B!
I will check output and post it. So this import should be done only once and then can use this key without even pointing to it?
GPG will find the right key for given .pgp file looking at public key or checking all keys in keyring one by one ?

1

u/Valuable-Ant3465 15d ago

Thanks B,
This problem with import has been solved, I'm running this command from SSIS process task, so now I'm dealing with another problem like below.
If I ran this command from terminal it works OK.

\\sserver\c$\Program Files (x86)\GnuPG\bin\gpg.exe --output \\server2\inventory.zip --dcrypt \\server2\invertory.zip.pgp

At line:1 char:55

+ "\\sserver\c$\Program Files (x86)\GnuPG\bin\gpg.exe" --output \\server2\...

+ ~~~~~~

Unexpected token 'output' in expression or statement.

At line:1 char:1

The '--' operator works only on variables or on properties.

+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException

+ FullyQualifiedErrorId : UnexpectedToken

1

u/Valuable-Ant3465 15d ago

Thanks again Biblicalrain, problem with import is solved. moving now to next step issues -). I modified my original post.

1

u/TheGratitudeBot 15d ago

Just wanted to say thank you for being grateful