Ben*_*Ben 21
您可以~/.gnupg/gpg-agent.conf
使用以下行设置gpg-agent的超时时间:
default-cache-ttl 3600
Run Code Online (Sandbox Code Playgroud)
这将告诉gpg-agent存储密码短语一小时.你不希望它是无限期的,但不是经常输入它也是有益的.
Pel*_*red 20
如果您使用的是 Mac,我建议您使用pinentry-mac
. 然后您可以将密码保存到 macOS 钥匙串。
使用 安装brew install pinentry-mac
,然后将此行添加pinentry-program /opt/homebrew/bin/pinentry-mac
到~/.gnupg/gpg-agent.conf
(删除/注释掉pinentry-program
该文件中的任何其他行)