On Fedora 22, gpg doesn't find 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 271AFBAFgpg: using subkey 271AFBAF instead of primary key 50EA64D5gpg: using subkey 271AFBAF instead of primary key 50EA64D5gpg: gpg-agent is not available in this sessiongpg: Sorry, no terminal at all requested - can't get input
How to make gpg find gpg-agent
gpg;gpg agent
Looking at the versions reveals the problem:% gpg-agent --versiongpg-agent (GnuPG) 2.1.7% gpg --version                                                               gpg (GnuPG) 1.4.19The components come from different packages (gnupg2-2.1.7-1.fc22.x86_64 andgnupg-1.4.19-2.fc22.x86_64 in my case). The solution is to use the gpg2command instead of gpg.