-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSH_AUTH_SOCK is not set when using SSH Agent #1136
Comments
ssh-agent on Windows, currently works a bit different than how it does on Unix. Its implemented as a service and exposed on a named pipe. The name of this name pipe is static and all ssh binaries assume this static one, if SSH_AUTH_SOCK is not explicitly set. Given your observations, it looks like Git on your machine is invoking a different version of ssh client. Double check what version of ssh.exe is being invoked (in task manager) when you are being prompted for the password. |
This link should help. |
Thank you very much for this. I set the GIT_SSH_COMMAND environment variable as the link states and everything started working :-). |
What is the name of this pipe? I can't find it mentioned in any docs and have no idea where to look in the code. |
I am facing a similar issue. I need to forward SSH_AUTH_SOCK to a docker container. Is there any way to achive this? Kind regards |
name of the pipe is: \.\pipe\openssh-ssh-agent |
Dear @manojampalam Thank you very much for this information. I could successfully mount the pipe into a windows docker container. When I run ssh-add in the container it does recognize the pipe. I know this, because it complains if I do not mount it. However, running ssh-add -l does not list any keys. :( Any advice, what is missing here? Kind regards Konstantin |
"OpenSSH for Windows" version
7.6.1.0
Client OperatingSystem
Windows 10 Pro
What is failing
I have successfully got SSH Agent working to hold my private key so I am able to SSH into remote machines without the need to enter my password.
However I also use the same SSH key for my Git operations.
Each time I use
git push
it asks me for my password even though my key is in the agent.Digging into this it seems that Git uses the env var
SSH_AUTH_SOCK
to access the agent and thus the key. This env var is not being set at all and does not exist.Expected output
It is my understanding that running
ssh-agent
on its own should give me back theSSH_AUTH_SOCK
andSSH_AGENT_PID
but I get nothing back at all fromssh-agent
when run in a terminal (elevated or otherwise).(The SSH Agent service is running)
Actual output
No output from
ssh-agent
and no environment variables set.The text was updated successfully, but these errors were encountered: