I am trying to set up
When I log in to my machine (via SSH) and invoke
gpg, it asks for password every time (it does not start
When I start
gpg-agent manually using:
eval "$(gpg-agent --daemon)"
then next invocation of
gpg actually launches the agent, and after typing my password once, I can then use gpg without password. Also, I see a socket has been created in
When I log out and log in again (ssh), I see the socket still exists in
ps shows that the agent is running, but every invocation of
gpg asks for password, as if there was no agent.
I have added this to my
GPG_TTY=$(tty) export GPG_TTY
but that does not seem to help
I find the behaviour of
gpg-agent very confusing. I am familiar with
ssh-agent and that behaves straightforward and understandable.
How can I use
gpg-agent same way as I would use
For comparison, this is how
After I boot my machine and login for the first time, I launch
ssh-add manually and type my pass phrase once.
Then, every time I log in to my machine (X, console, ssh, ...) I can use the agent (I don't need to type my password again). This is done by adding following line to
export SSH_AUTH_SOCK="$(find /tmp/ssh-*/agent.* -uid $(id -u) -type s -print -quit 2>/dev/null)"