I'm trying to set up gpg-agent as the common authentication agent under Windows. It works fine for both Putty and regular gpg use, but now I'd like to use it as ssh-agent in git bash as well.
From what I've gathered, it should be sufficient to use
export GPG_AUTH_SOCK=~/AppData/Roaming/gnupg/S.gpg-agent.ssh
export GPG_AGENT_PID=$$
I can't use the real agent PID here, because the abstraction layer will hide processes outside the msys environment, so I use the shell's PID.
The gpg agent has been started with the enable-ssh-support
and enable-putty-support
options, and the agent socket is properly created. However, ssh-add
claims that it cannot connect to the agent.
What is the correct way to introduce the running gpg-agent as the ssh agent into a new git bash?
set
to create the environment variables).