gpg passphrase automation
by vinmansbrew from LinuxQuestions.org on (#56R7V)
I am looking to try and automate a gpg decryption, the problem I run into is when it asks for a passphrase. I am having trouble finding a variable to allow the passphrase to run with the command.
I am aware of the security concerns, of having a clear text password. Ideally, I'd like to have a script file that is limited to only the user that would run it. Which would be the same user that is doing the decryption.
I've tried a couple commands:
gpg -d "file-name" --passphrase="phrase" , --passphrase "phrase" , --passphrase-file "file with passphrase in it"
And a couple other variations.


I am aware of the security concerns, of having a clear text password. Ideally, I'd like to have a script file that is limited to only the user that would run it. Which would be the same user that is doing the decryption.
I've tried a couple commands:
gpg -d "file-name" --passphrase="phrase" , --passphrase "phrase" , --passphrase-file "file with passphrase in it"
And a couple other variations.