Git Bash and 1Password SSH not working
I've setup 1Password (the app and the extension) on a newly installed Windows 11 Pro. When attempting to do anything related to my SSH keys from within Git Bash I keep getting git@github.com: Permission denied (publickey) , however if I do the exact same action from within PowerShell or CMD everything works as expected.
I followed the setup guide that can be found here: https://developer.1password.com/docs/ssh
My .gitconfig is the following:
[core]
editor = \"C:\\Users\\Svetlozar\\AppData\\Local\\Programs\\Microsoft VS Code\\bin\\code\" --wait
sshcommand = C:/Windows/System32/OpenSSH/ssh.exe
[user]
name = Svetlozar Redacted
email = svetlozar
ssh -Tv git@github.com output:
! OpenSSH_9.0p1, OpenSSL 1.1.1o 3 May 2022
! debug1: Reading configuration data /etc/ssh/ssh_config
! debug1: Connecting to github.com [140.82.121.3] port 22.
! debug1: Connection established.
! debug1: identity file /c/Users/Svetlozar/.ssh/id_rsa type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_rsa-cert type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_ecdsa type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_ecdsa-cert type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_ecdsa_sk type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_ecdsa_sk-cert type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_ed25519 type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_ed25519-cert type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_ed25519_sk type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_ed25519_sk-cert type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_xmss type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_xmss-cert type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_dsa type -1
! debug1: identity file /c/Users/Svetlozar/.ssh/id_dsa-cert type -1
! debug1: Local version string SSH-2.0-OpenSSH_9.0
! debug1: Remote protocol version 2.0, remote software version babeld-f7bde3b6
! debug1: compat_banner: no match: babeld-f7bde3b6
! debug1: Authenticating to github.com:22 as 'git'
! debug1: load_hostkeys: fopen /c/Users/Svetlozar/.ssh/known_hosts2: No such file or directory
! debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
! debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
! debug1: SSH2_MSG_KEXINIT sent
! debug1: SSH2_MSG_KEXINIT received
! debug1: kex: algorithm: curve25519-sha256
! debug1: kex: host key algorithm: ssh-ed25519
! debug1: kex: server->client cipher: mailto:chacha20-poly1305@openssh.com MAC:compression: none
! debug1: kex: client->server cipher: mailto:chacha20-poly1305@openssh.com MAC:compression: none
! debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
! debug1: SSH2_MSG_KEX_ECDH_REPLY received
! debug1: Server host key: ssh-ed25519 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU
! debug1: load_hostkeys: fopen /c/Users/Svetlozar/.ssh/known_hosts2: No such file or directory
! debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
! debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
! debug1: Host 'github.com' is known and matches the ED25519 host key.
! debug1: Found key in /c/Users/Svetlozar/.ssh/known_hosts:1
! debug1: rekey out after 134217728 blocks
! debug1: SSH2_MSG_NEWKEYS sent
! debug1: expecting SSH2_MSG_NEWKEYS
! debug1: SSH2_MSG_NEWKEYS received
! debug1: rekey in after 134217728 blocks
! debug1: Will attempt key: /c/Users/Svetlozar/.ssh/id_rsa
! debug1: Will attempt key: /c/Users/Svetlozar/.ssh/id_ecdsa
! debug1: Will attempt key: /c/Users/Svetlozar/.ssh/id_ecdsa_sk
! debug1: Will attempt key: /c/Users/Svetlozar/.ssh/id_ed25519
! debug1: Will attempt key: /c/Users/Svetlozar/.ssh/id_ed25519_sk
! debug1: Will attempt key: /c/Users/Svetlozar/.ssh/id_xmss
! debug1: Will attempt key: /c/Users/Svetlozar/.ssh/id_dsa
! debug1: SSH2_MSG_EXT_INFO received
! debug1: kex_input_ext_info: server-sig-algs=
! debug1: SSH2_MSG_SERVICE_ACCEPT received
! debug1: Authentications that can continue: publickey
! debug1: Next authentication method: publickey
! debug1: Trying private key: /c/Users/Svetlozar/.ssh/id_rsa
! debug1: Trying private key: /c/Users/Svetlozar/.ssh/id_ecdsa
! debug1: Trying private key: /c/Users/Svetlozar/.ssh/id_ecdsa_sk
! debug1: Trying private key: /c/Users/Svetlozar/.ssh/id_ed25519
! debug1: Trying private key: /c/Users/Svetlozar/.ssh/id_ed25519_sk
! debug1: Trying private key: /c/Users/Svetlozar/.ssh/id_xmss
! debug1: Trying private key: /c/Users/Svetlozar/.ssh/id_dsa
! debug1: No more authentication methods to try.
! mailto:git@github.com: Permission denied (publickey).
When trying to look up for ways to resolve my issue I stumbled upon the following discussion https://1password.community/discussion/comment/634953#Comment_634953 where its mentioned that 1Password doesn't work within Git Bash, but then other discussions such as the one here: https://1password.community/discussion/127941/git-bash-always-wants-windows-hello-authentication seem to show that it is possible to make 1Password's SSH work with Git Bash.
The only relevant bit of the setup docs that I could think of which involves Git Bash is the following command: git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe" which I have ran and confirmed that the line is indeed added to the .gitconfig as seen above.
Does anyone have any idea what I could be missing or why it might not be working properly?
1Password Version: 8.7.1
Extension Version: 2.3.5
OS Version: Windows 11 Pro
