2

I was starting my gpg-agent like this in my .bashrc file

[ -f ~/.gpg-agent-info ] && source ~/.gpg-agent-info
if [ -S "${GPG_AGENT_INFO%%:*}" ]; then
  export GPG_AGENT_INFO
else
  eval $( gpg-agent --daemon --write-env-file ~/.gpg-agent-info )
fi

GPG_TTY=$(tty)
export GPG_TTY

Since the upgrade to 16.04 when I log in I receive this message:

gpg-agent[11727]: WARNING: "--write-env-file" is an obsolete option - it has no effect
gpg-agent[11728]: gpg-agent (GnuPG) 2.1.11 started
S.gpg-agent is written in .gnupg/

So write-env-file is not longer supported. I can no longer enter my gpg password in the pinentry dialogue box and have gpg reuse this, which I could under Ubuntu 14.04.

How can I set this up in 16.04?

2
  • The gpg-agent starts. When I use gpg to view a gpg protected file: gpg --decrypt cat-me.txt.gpg I receive the message: gpg: gpg-agent is not available in this session Before the upgrdae to Ubuntu 16.04 I would recieve a pop up box. this would save the gpg details, so next time I did gpg --decrypt I would not have to enter a gpg password.
    – abhorrent
    Aug 31 '16 at 14:53
  • OK. The issue seems to be that gpg-agent 2.1.11 does not set the GPG_AGENT_INFO environment variable. If I export GPG_AGENT_INFO to point to the socket file ie.|export GPG_AGENT_INFO=/home/<user>/.gnupg/S.gpg-agent:12065:1 with the pid and owner pid then I get the pinentry box for the passphrase.
    – abhorrent
    Aug 31 '16 at 15:27
3

The issue seems to be that gpg-agent 2.1.11 does not set the GPG_AGENT_INFO environment variable. If I export GPG_AGENT_INFO to point to the socket file ie.|export GPG_AGENT_INFO=/home//.gnupg/S.gpg-agent:12065:1 with the pid and owner pid then I get the pinentry box for the passphrase.

0

On my 16.04.1 LTS the options file gpg.conf located in ~/.gnupg was missing. I created one with the option use-agent (Just like on my other old Ubuntu 14.04-LTS) and it worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.