5

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?

  • How are you starting/launching this "new git bash"? – Eduardo Nov 10 '15 at 16:30
  • Either way behaves the same -- context menu on folder, start menu, ... I get the same behaviour running git from cmd.exe directly (in which case I use set to create the environment variables). – Simon Richter Nov 10 '15 at 17:15
  • @SimonRichter, did you make any progress with this? I've been trying to start the gpg-agent daemon through git bash on Windows, but it fails miserable with: ERR 67109139 Unknown IPC command <GPG Agent>. Did you get that error too? – dSebastien Nov 28 '17 at 14:37

Your Answer

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

Browse other questions tagged or ask your own question.