Our situation is we are trying to automate the decryption of an encrypted file through SQL Server Integration Services.
We are running the following command through a SQL Server Job:
gpg --output c:\temp\test.txt.pgp --batch --passphrase testpassphrase --decrypt c:\temp\test.txt
Running it as a SQL job is failing, with the following message:
gpg: decryption failed: No secret key. Process Exit Code 2. The step failed.
If we try to run the same command through cmd.exe it decrypts the file successfully.