Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
bjoernb
3 months agoNew Contributor
Win11 -> WSL2 -> devcontainer ssh-add not accessible anymore
Hi all, I'm working on Windows 11 Pro, where 1 Password in the latest stable version is installed. I have WSL2 enabled with Ubuntu 24.04 installed and inside there I have docker installed to run dev...
- 3 months ago
Thanks for triggering this issue, it's the VS Code update, downgrading VS Code solves it for me. To be tracked here: https://github.com/microsoft/vscode/issues/251456
So for future reference: On the Windows host, the 1Password ssh agent has to be activated in the settings of 1Password. gitconfig should be extended and aliases in WSL should be created, like mentioned here: https://developer.1password.com/docs/ssh/integrations/wsl
That's it, then ssh keys from 1Password on Windows should be accessible in Windows, WSL and inside devcontainers. In WSL the SSH_AUTH_SOCK variable is empty. When starting a devcontainer, VSCode will create a socket and this should be visible in the logs (F1 > Dev Containers: Show Container Log)
[886954 ms] Start: Launching Dev Containers helper. [886955 ms] ssh-agent: SSH_AUTH_SOCK not set on wsl host. [886955 ms] ssh-agent: SSH_AUTH_SOCK not set on local host. [886955 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-19e6a8e3-90b7-4bf3-bb6f-98aa4e871c30.sock) forwarded to local host (\\.\pipe\openssh-ssh-agent).
Even commit signing will work with this infrastructure in Windows, WSL and devcontainer. It's pretty awesome when it works.
manski
3 months agoNew Contributor
I've created an issue for the DevContainer extension: https://github.com/microsoft/vscode-remote-release/issues/11041
Let's see how this goes.
- bjoernb3 months agoNew Contributor
Thanks for triggering this issue, it's the VS Code update, downgrading VS Code solves it for me. To be tracked here: https://github.com/microsoft/vscode/issues/251456
So for future reference: On the Windows host, the 1Password ssh agent has to be activated in the settings of 1Password. gitconfig should be extended and aliases in WSL should be created, like mentioned here: https://developer.1password.com/docs/ssh/integrations/wsl
That's it, then ssh keys from 1Password on Windows should be accessible in Windows, WSL and inside devcontainers. In WSL the SSH_AUTH_SOCK variable is empty. When starting a devcontainer, VSCode will create a socket and this should be visible in the logs (F1 > Dev Containers: Show Container Log)
[886954 ms] Start: Launching Dev Containers helper. [886955 ms] ssh-agent: SSH_AUTH_SOCK not set on wsl host. [886955 ms] ssh-agent: SSH_AUTH_SOCK not set on local host. [886955 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-19e6a8e3-90b7-4bf3-bb6f-98aa4e871c30.sock) forwarded to local host (\\.\pipe\openssh-ssh-agent).
Even commit signing will work with this infrastructure in Windows, WSL and devcontainer. It's pretty awesome when it works.