I ran into a problem using VSCode devcontainers with git.
Even though ssh-add -L
showed my identity and thus the forward that VSCode does, works.
However, git pulls/pushes did not work.
I'll try to reproduce the error in ssh -T git@github.com -vvv
when I'm at a yet unupgraded Windows machine. (Of course I forgot)
It said something like 'unable to communicate with agent' ... which told me the connection exists, but communication goes boink.
Hours of research amd trying to mount my local .ssh
folder into the container (wasn't able to manage that ... any path before
/.ssh
got stripped from the mount command in devcontainer.json
once it was transferred to docker. Go figure.)
After googleing the error msg from the ssh test (unable to communicate with agent ... so the socket itself (SSH_AUTH_SOCK) seems to be active ... that's what VSCode tunnels into the container.), I finally came across this
The author (THANK YOU !!) pushed me into the right direction ...
Then I had to find the download for the new version of OpenSSH:
It says beta. All of them do, except the source code files from the links to the 'portable' maintainer. I can't make sense of it and was happy to find the link above.
I went with the 64-Bit version. Revision: Download the .msi and follow the link within the above post for instructions on how to install the .msi.
I'll combine and compress the instructions here:
Follow instructions 1-4 from above mentioned post.
Download the .zip
file.
Follow the .msi install instructions.
Check the system path and make sure the old link to somewhere in system32 is not present, instead there should be a new path to
C:\Progam Files\OpenSSH\
. To edit/view the system path in Windows 10:
Settings->System->About->Advanced System Settings (On right side)
There, in Advanced tab, is Environment variables.
You'll want to check the Path variable in System variables.
I additionally ran both Fix scripts as well.
Here I found that rebooting (Yeah, it's still Windows) helped a lot.
Continue instructions from 6 on.
If this dowsn't really work, open Services(.msc) and set the entry for the OpenSSH Authentication Agent to start automatically. (And start it, if it isn't running)
Check with ssh-add -L
or ssh-add -l
if your identity is known and therefore ssh-agent
is working.
Restart Windows (again) and check. Again ... :-)
Hope it helped.
Arno Krause, devlog@golden-eagle.net