Win11 + 1Password8 -> VSCode -> WSL -> devContainer

Options
bjoern.busch
bjoern.busch
Community Member

I'm trying to set up SSH Key Management in 1Password and use the ss-agent functionality.

  • I have it properly working on the host Win11 system, I can properly log on to a git server, as well as sign commits and retrieve available keys via ssh-add.exe
  • I'm using VSCode in combination with WSL. Also for this level of inception, I have this properly working now. The ssh-agent is forwarded into WSL and I can properly log on to a git server, as well as sign commits and retrieve available keys via ssh-add.exe.
  • Now inside WSL, docker is running and I'm trying to work with devcontainers. Here I'm struggling to get things to work. ssh-add -L is not returning anything and ssh-add.exe is not available, since the host file system is not at this level, only on WSL.

Is there a manual somewhere how to get this to work?

Thanks in advance


1Password Version: 8.10.22
Extension Version: Not Provided
OS Version: Win11
Browser: Not Provided

Comments

  • bjoern.busch
    bjoern.busch
    Community Member
    Options

    So I found this as a solution: https://gist.github.com/WillianTomaz/a972f544cc201d3fbc8cd1f6aeccef51

    Instead of using the interop feature of WSL, I'm using the named pipes now.

    Is this THE solution or can I somehow forward the interop feature into the devcontainer?

  • nbaileyMA
    nbaileyMA
    Community Member
    Options

    I had previously set it up the way it was described in that link, but I undid all of that after the latest release.

    1Password for Windows 8.10.22 (81022040)

    I followed the instructions here, which it sounds like you already did. https://developer.1password.com/docs/ssh/integrations/wsl/

    But with that, everything worked for me in the dev containers. Running ssh-add -l within my dev container lists my keys from Windows. Are you launching right into the dev container? Or do you open the workspace in WSL first?

    My environment specifically is:

    • Windows 11 (23H2)
    • WSL2 (Ubuntu 22.04)
    • VSCode

    When I open WSL, I take the following steps:

    • cd to directory of my repo
    • code .
    • When VS Code opens it prompts me to authorize 1Password via Windows Hello
    • Once that's done, then I Reopen in Container from VSCode's command window (Ctrl-Shift-P)
    • When I run ssh-add -l