在没有运行 gpg-agent 的情况下,我可以输入我的密码来签名:
$ echo 123 | gpg -s
You need a passphrase to unlock the secret key for
user: "Mr. Ops <ops@bxxx.com>"
2048-bit RSA key, ID 20F31903, created 2014-03-13
gpg: gpg-agent is not available in this session
Enter passphrase:
Run Code Online (Sandbox Code Playgroud)
工作正常。但我不想一直输入密码,所以我运行 gpg-agent:
$ eval $(gpg-agent --daemon)
Run Code Online (Sandbox Code Playgroud)
现在我希望至少有一次提示我输入密码,但我从来没有,并且所有使用 gpg 的操作都失败了。
$ echo 123 | gpg -s
You need a passphrase to unlock the secret key for
user: "Mr. Ops <ops@bxxxx.com>"
2048-bit RSA key, ID 20F31903, created 2014-03-13
gpg: cancelled by user …Run Code Online (Sandbox Code Playgroud)