1password git support for ssh in WSL2?

AlmoEnd
AlmoEnd
Community Member

I am only able to sync with Github using PATs; for some reason the SSH key is not retrieved, using VSCode with WSL extension, or from a command (zsh) shell I get access denied (publickey) when issuing git pull or git push commands. In a windows powershell or VSCode instance, behavior is "normal" and I'm prompted for access to the SSH key(s).


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

Comments

  • AlmoEnd
    AlmoEnd
    Community Member

    Can I somehow store the SSH key in the ~/.ssh folder in a Ubuntu 22.04 distro?

  • AlmoEnd
    AlmoEnd
    Community Member
    edited June 29

    I "solved" the issue by creating a new ed25519 key with ssh-keygen in WSL/Ubuntu. I then overwrote the contents of .pub and with my saved 1P github SSH items' public and encrypted private key. Then I ran ssh-add <keygen'ed_ID> and was prompted for the passphrase I used for encryption of the private key. Subsequent pulls and pushes (and VSCode with WSL extension) worked without prompt, but it felt like a bit of a hack. Guess WSL isn't on the dev team's radar.

  • AlmoEnd
    AlmoEnd
    Community Member
    edited June 29

    Above isn't a workable workaround :) After a reboot ssh-add ~/.ssh/1p_github Could not open a connection to your authentication agent. looks like I'll have to run eval \ssh-agent -s` and enter the password each time. Can I import the toml file into WSL to make 1P take charge of SSH connections in the VM?