Use 1password to manage ssh keys in WSL

marcogorelli
marcogorelli
Community Member
edited April 2023 in SSH

I have a Windows laptop, but use the WSL for development.

How can I use 1password to manage ssh keys for me for GitHub?

The document https://developer.1password.com/docs/ssh/agent assumes you're using a Windows app and then using ssh keys on Windows. However, I am using the Windows app but ssh keys in Linux


1Password Version: 8.10.5
Extension Version: Not Provided
OS Version: windows 11 pro
Browser:_ firefox

Comments

  • justinbarclay
    justinbarclay
    Community Member

    I talk about my experience of getting 1Password working with WSL2 here, but the TLDR is to call the Windows version of SSH directly in your git config

    [core]
      sshProgram = "ssh.exe"
    
  • marcogorelli
    marcogorelli
    Community Member

    This worked perfectly, thank you so much!

    In summary, I followed the windows instructions, and then, in wsl, in ~/.gitconfig, I put

    [core]
        sshCommand = "ssh.exe"
    
  • Thanks for sharing your solution and blogpost, @justinbarclay! Glad to hear it resolved your issue, @marcogorelli.

  • marcogorelli
    marcogorelli
    Community Member

    any chance this could be added to the docs please?

  • @marcogorelli we're looking into adding this to our official docs.

This discussion has been closed.