It’s Cybersecurity Awareness Month! Join our interactive training session, or learn about security and AI from 1Password experts.
Forum Discussion
bjoernb
4 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...
- 4 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.
ajm1811
4 months agoNew Contributor
Hi bjoernb - I've been using this setup for about 3 years and it's worked great. However, I concur - a few days ago this stopped working for me too. I notice 1Password updated about a week ago but I think it's been working for me since then. But I also noticed that a new release of the vscode devcontainers extension was shipped on 12th June and my extension updated on the 16th which I think is about the time it stopped working for me.
EDIT - can confirm that the issue is with the devcontainers extension v0.417.0. If I downgrade that extension back to v0.413.0 (via the uninstall>>install specific version menu on the extension itself) then it's working again.
Release notes of v0.417.0 suggest some addition of a feature allowing you to add an ssh pre-connection script so could be something to do with that.
bjoernb
4 months agoNew Contributor
Thanks ajm1811, I missed your edit, awesome that it is working for you again!!
I tried also downgrading to 413, deleted all containers and images, shut down wsl, rebooted, but it is still broken. Do you have a value for SSH_AUTH_SOCK in WSL / devcontainer now?
When you open the log from the devcontainer (F1 > Dev Containers: Show Container Log) can you search for ssh-agent there and let me know what you see there?