vmacarios / devcontainer

Encapsulated development environment to reduce the boilerplate to start developing.
0 stars 0 forks source link

Improve ssh-agent forwarding #30

Closed vmacarios closed 5 days ago

vmacarios commented 5 days ago

The current ssh-agent forwarding relies on the usage of socat to provide a unix domain socket and allow the usage of the agent inside the container. As the ssh-agent is already forwarded from Windows to WSL2 using the same principle, the method is therefore unreliable (Broken pipe error is thrown when ansible try to simultaneously connect to multiple hosts).

Mapping the WSL2 socket into the container would be a more efficient solution.

vmacarios commented 5 days ago

Makefile and README.md have been updated with the new mapping parameter:

-v "$SSH_AUTH_SOCK:/user-homedir/.ssh/ssh-auth.sock" \