can't connect to `C:/Program Files/GNU/GnuPG//S.gpg-agent'

Mantas Mikulėnas grawity at
Thu Oct 29 17:27:18 CET 2009

On 2009-10-29 14:59, listac at wrote:
> When using linux, even when I start gpg-agent --daemon, it creates it's
> socket under /tmp/<cryptdir>, while gpg searches for .gnupg/S.gpg-agent.
> The environment the daemon exports seems to be ignored.
> So I have to manually link .gnupg/S.gpg-agent to theat file below /tmp to
> be able to work with a smartcard at all.
> # gpg-agent --daemon
> GPG_AGENT_INFO=/tmp/gpg-mS2h6N/S.gpg-agent:1510:1; export GPG_AGENT_INFO;
> # gpg2 --card-status
> can't connect to `/root/.gnupg/S.gpg-agent': No such file or directory

Because it doesn't export anything. A program cannot modify the
environment of its parent, so gpg-agent has to be executed like this:

» eval $(gpg-aget --daemon)


The 'eval $(foo)' part is tells your shell (bash, zsh) to interpret
gpg-agent's output as commands; without it, all gpg-agent can do is
print them to stdout.

Mantas Mikulėnas <grawity at> / PGP 0xCA07F3A91C9F7C03
ASCII ribbon campaign - stop HTML mail

More information about the Gnupg-users mailing list