We use StackExchange blackbox as well as Hiera-eyaml-gpg to encrypt files in our Git repo using GPG keys.
I configured Git to decrypt files using Textconv configuration, so it automatically decrypts and compares both blackbox and .eyaml files when I execute commands like git show ...
, git diff ...
or git log -p ...
.
I also use GPG agent on my OSX, so it remembers the passphrase for a while.
The problem I hit is specifically with eyaml - if I execute git show HEAD..FETCH_HEAD
and the agent needs to refresh the passphrase then it will automatically pop-up a nice TUI asking to re-type it. This works great if it was triggered via Blackbox but not by gpg-hiera-eyaml
.
I'd like to find a way to tell gpg "now please ask for the passphrase if needed" directly from the command line, without having to trigger some blackbox command.
Is this possible?
Thanks.
EDIT: This is with GPG 1.4.20 on OSX.
EDIT: I tried preset'ing the passphrase with gpg-preset-passphrase -v -c $(gpg --list-secret-keys --with-fingerprint --with-colons | awk -F: '$1 == "fpr" { print $10 }')
but it doesn't make a difference - git diff
with eyaml files still tries to read the passphrase and fails.
Try: