Reputation: 31
I'm trying to have unattended decryption of gpg-encrypted password stores created in pass, but am encountering errors even though my passphrase is cached...
The basic test command I'm using for this ( gpg -d ~/.password-store/hostname/file.gpg
) produces the following error: gpg: Sorry, we are in batchmode - can't get input
Even if I remove batch
option from gpg.conf, it will then ask me for the gpg passphrase that was defined during gpg encryption. However, this should not happen as my config files are setup correctly and I can confirm the gpg-agent has my passphrase fubar
cached:
% gpg-connect-agent "GET_PASSPHRASE --data --no-ask D16778601E81E1B4B4E4F9960C59D191A256F7B9 t1 t2 t3" /bye
D fubar
OK
Config files:
#gpg.conf
use-agent
batch
pinentry-mode loopback
#gpg-agent.conf
default-cache-ttl 600
max-cache-ttl 86400
allow-loopback-pinentry
allow-preset-passphrase
pinentry-program /opt/homebrew/bin/pinentry-mac
I must be missing something. I've been stuck on this for ages. Help is much appreciated!
Upvotes: 0
Views: 48