在Fedora 22上,gpg没有找到gpg-agent:
% gpg-agent --daemon
% gpg -vvv --use-agent --no-tty --decrypt file.gpg
gpg: using character set `utf-8'
:pubkey enc packet: version 3, algo 1, keyid 3060B8F7271AFBAF
data: [4094 bits]
gpg: public key is 271AFBAF
gpg: using subkey 271AFBAF instead of primary key 50EA64D5
gpg: using subkey 271AFBAF instead of primary key 50EA64D5
gpg: gpg-agent is not available in this session
gpg: Sorry, no terminal at all requested - can't get input发布于 2015-09-22 16:48:21
看看这些版本就会发现问题所在:
% gpg-agent --version
gpg-agent (GnuPG) 2.1.7
% gpg --version
gpg (GnuPG) 1.4.19组件来自不同的包(在我的例子中是gnupg2-2.1.7-1.fc22.x86_64和gnupg-1.4.19-2.fc22.x86_64 )。解决方案是使用gpg2命令而不是gpg。
发布于 2017-11-29 22:02:48
如果这对某些人有帮助,gpg 1.4可以很好地使用gpg-agent 2.1。
当我调查它的时候,我发现了这样的帖子:https://lists.gnupg.org/pipermail/gnupg-devel/2014-October/029024.html
代理是兼容的,但不再导出较早版本的gpg所期望的环境变量。如果您手动设置这些,它将只起作用:
export GPG_AGENT_INFO=${HOME}/.gnupg/S.gpg-agent:0:1
https://unix.stackexchange.com/questions/231386
复制相似问题