2
使用gpg-preset-passphrase在2.1.15中缓存通过pinentry输入的密码短语需要采取什么步骤?
我正在尝试缓存密码短语以在无人照管的计算机上使用。由于这样做会带来一定的风险,因此,我宁愿选择要缓存的密码短语,并避免同时设置两者default-cache-ttl和max-cache-ttl令人讨厌的高值,以及避免需要gpg-agent定期清除整个缓存-因此,我正在寻找使用的解决方案gpg-preset-passphrase。我在进行故障排除时发现的某些信息是指旧版本的GnuPG,因此我不确定我是否已充分考虑了所有差异。 首先,按照规定man 1 gpg-agent,我export GPG_TTY=$(tty)在我的.bashrc中。 现在假设我eval $(gpg-agent --daemon --allow-preset-passphrase --default-cache-ttl 1 --max-cache-ttl 31536000)开始启动gpg-agent,注意gpg-preset-passphrase仍然使用--max-cache-ttl(默认2小时)。 然后,我用获取$KEYGRIP所需的秘密子密钥的密钥gpg --with-keygrip -K。 有了这个我尝试/path/to/gpg-preset-passphrase -c $KEYGRIP。在返回时,将打印: gpg-preset-passphrase: caching passphrase failed: Not implemented 尝试再次添加--verbose --debug 6 --log-file /path/to/gpg-agent.log到gpg-agent,我的日志附加了 gpg-agent[4206] listening on socket /run/user/1000/gnupg/S.gpg-agent gpg-agent[4207] gpg-agent (GnuPG) 2.1.15 started gpg-agent[4207] handler 0x7f86ef783700 for fd 5 started gpg-agent[4207] command PRESET_PASSPHRASE …