I am trying to use shell script in order to encrypt/decrypt the selected text with GPG. This command works fine in Terminal: echo "Test text" | gpg -c --no-symkey-cache | openssl enc -base64 -A | pbcopy
GPG prompts for password and sends encrypted text to clipboard.
In Keyboard Maestro I don't see GPG prompt for password and nothing is returned to clipboard. I used the copy action and then the command gpg -c --no-symkey-cache | openssl enc -base64 -A | pbcopy
Other encryption tools I've used allow you to pass the password as a parameter, so you can use a Prompt for User Input action to enter your password and pass it to the Execute a Shell Script action.
Thank you! It was just a PATH environment that was causing the problem and your advice fixed everything.
As regards GPG it is a Mac app that installs Command Line Utility by default. When you run the script GPG's dialog box pops up asking for password. This was a deliberate choice as I don't want to keep the password in plain string within KM script.
No, there is nothing special to be installed apart from GPG. But if it works in command line I would guess you need to set the ENV_PATH variable as Chris explained above.