Skip to content
Stuart Hicks edited this page Jul 4, 2022 · 2 revisions

1Password For SSH and Git

https://developer.1password.com/docs/ssh

macOS

In ~/.ssh/config:

Host *
  IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"

Windows (WSL)

Make sure you disable the Windows "OpenSSH Authentication Agent" service, as it will conflict with npiperelay. Then download npiperelay and socat. Example shell config:

export SSH_AUTH_SOCK="$HOME/.ssh/agent.sock"
if ! ss -a | grep -q "$SSH_AUTH_SOCK"; then
  rm -f "$SSH_AUTH_SOCK"
  ( setsid socat "UNIX-LISTEN:$SSH_AUTH_SOCK,fork" "EXEC:$HOME/winhome/.wsl/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent,nofork" & ) &> /dev/null
fi
Clone this wiki locally