Forwarding MSYS SSH agent socket is not supported
See original GitHub issueActual Behavior
nerdctl build --ssh default
on Windows 11 is not able to look at SSH_AUTH_SOCK
to locate ssh-agent, nor is it able to access the socket if I specify it manually.
Steps to Reproduce
On Windows 11, starting ssh-agent, then
nerdctl build --ssh default
Result
Error message about SSH_AUTH_SOCK
not set
Expected Behavior
Make ssh-agent available to image build process.
Additional Information
The purpose is to check out a git repository during build that is protected by a ssh deploy key. I first asked a question here, but got pointed in this direction.
Rancher Desktop Version
1.0.1
Rancher Desktop K8s Version
1.23.3
Which container runtime are you using?
containerd (nerdctl)
What operating system are you using?
Windows
Operating System / Build Version
Windows 11 Pro 21H2, 22000.493
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
No response
Windows User Only
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
SSH agent forwarding not working on Windows #3670 - GitHub
I am using the ssh-agent that comes with Git for Windows, and it works quite well with ssh itself, but it is not...
Read more >ssh agent forwarding not working on Windows - Super User
When I ssh from my Linux client with AgentForwarding enabled into a Windows 11 host, I cannot access the client keys on the...
Read more >Why is ssh agent forwarding not working? - Server Fault
It turns out my key was not in the agent, and this fixed it: OS X: ssh-add -K. Linux/Unix: ssh-add -k. You can...
Read more >Could not open a connection to your authentication agent
SSH needs two things in order to use ssh-agent: an ssh-agent instance running in the background, and an environment variable set that tells...
Read more >SSH Agent Forwarding - What are the best practices and ...
Agent forwarding allows the remote server to access your local agent and performing key operations with your private keys. Private keys never ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh, well, in that case I don’t think there’s much we can do: that’s a path for the git bundled msys2 distribution. (Which actually mounts
%TEMP%
, i.e.C:\Users\<>\App\Local\Temp
, into/tmp
). That set of emulated Unix mounts is completely unrelated to the WSL paths, and even if we did try to map it, it wouldn’t be recognized as a Unix socket inside WSL (so the ssh agent wouldn’t work).It looks like Stack Overflow has a description of the msys Unix socket emulation format. That’s totally not doable in our case, I believe.
So I think that:
\Device\NamedPipe\openssh-ssh-agent
). However, ① this isn’t what you’re reporting, and ② we probably wouldn’t implement this any time soon.I am confusing myself, sorry. The environment variable is indeed in windows, and appears when running ‘start-ssh-agent’, which comes from git (I have it in
C:\Program Files\Git\cmd\start-ssh-agent.cmd
), whereas the windows 11 openssh install is inC:\Windows\System32\OpenSSH\ssh.exe
Looks like I am not the first struggling with this: https://github.com/docker/for-win/issues/167
The information contained in this message may be CONFIDENTIAL and is intended for the addressee only. Any unauthorized use, dissemination of the information or copying of this message is prohibited. If you are not the addressee, please notify the sender immediately by return e-mail and delete this message. Thank you