Attempting to clone a github repository via SSH does not prompt 1p auth

LeoCx1000
LeoCx1000
Community Member

❯ ssh -vT git@github.com
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
debug1: Reading configuration data C:\\Users\\Leonardo/.ssh/config
debug1: Connecting to github.com [140.82.121.3] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\Leonardo/.ssh/id_rsa type 0
debug1: identity file C:\\Users\\Leonardo/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\Leonardo/.ssh/id_ecdsa type -1
debug1: identity file C:\\Users\\Leonardo/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\Leonardo/.ssh/id_ecdsa_sk type -1
debug1: identity file C:\\Users\\Leonardo/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file C:\\Users\\Leonardo/.ssh/id_ed25519 type -1
debug1: identity file C:\\Users\\Leonardo/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\Leonardo/.ssh/id_ed25519_sk type -1
debug1: identity file C:\\Users\\Leonardo/.ssh/id_ed25519_sk-cert type -1
debug1: identity file C:\\Users\\Leonardo/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\Leonardo/.ssh/id_xmss-cert type -1
debug1: identity file C:\\Users\\Leonardo/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\Leonardo/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.5
debug1: Remote protocol version 2.0, remote software version d1a41be07
debug1: compat_banner: no match: d1a41be07
debug1: Authenticating to github.com:22 as 'git'
debug1: load_hostkeys: fopen C:\\Users\\Leonardo/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\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: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> 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\\Leonardo/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen __PROGRAMDATA__\\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\\Leonardo/.ssh/known_hosts:13
debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: agent returned 4 keys
debug1: Will attempt key: Github ED25519 SHA256:bws71uGY+L5mL6atEWqjfG2dtBEAOwAX78CKJo/irc0 agent
debug1: Will attempt key: GitHub Login ED25519 SHA256:CbR35bEiKFo09/CR/TIe90+igGCmT0b62AEk/lH3u7I agent
debug1: Will attempt key: Hetzner VPS node 1 RSA SHA256:hFkZijzFZFcNQ8ZbFqprMkXqUxtlQc1/QcYiLUWWliI agent
debug1: Will attempt key: Hetzner VPS node 0 ED25519 SHA256:OVCt74ZnlkKr5VnJmIPkJWehdM9WHrPEuB7yY7D1w/0 agent
debug1: Will attempt key: C:\\Users\\Leonardo/.ssh/id_rsa RSA SHA256:h0247Wq8VlSAtzmTr+2OnTqw88rl1u9ddWt3yblyolI
debug1: Will attempt key: C:\\Users\\Leonardo/.ssh/id_ecdsa
debug1: Will attempt key: C:\\Users\\Leonardo/.ssh/id_ecdsa_sk
debug1: Will attempt key: C:\\Users\\Leonardo/.ssh/id_ed25519
debug1: Will attempt key: C:\\Users\\Leonardo/.ssh/id_ed25519_sk
debug1: Will attempt key: C:\\Users\\Leonardo/.ssh/id_xmss
debug1: Will attempt key: C:\\Users\\Leonardo/.ssh/id_dsa
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa>
debug1: SSH2_MSG_SERVICE_ACCEPT received
b62AEk/lH3u7I agent
Authenticated to github.com ([140.82.121.3]:22) using "publickey".
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug1: Entering interactive session.
debug1: pledge: filesystem
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: client_input_hostkeys: searching C:\\Users\\Leonardo/.ssh/known_hosts for github.com / (none)
debug1: client_input_hostkeys: searching C:\\Users\\Leonardo/.ssh/known_hosts2 for github.com / (none)
debug1: client_input_hostkeys: hostkeys file C:\\Users\\Leonardo/.ssh/known_hosts2 does not exist
debug1: client_input_hostkeys: no new or deprecated keys from server
debug1: pledge: fork
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Hi LeoCx1000! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2156, received 2636 bytes, in 0.3 seconds
Bytes per second: sent 7897.4, received 9655.7
debug1: Exit status 1
❯ ssh-add -l
256 SHA256:bws71uGY+L5mL6atEWqjfG2dtBEAOwAX78CKJo/irc0 Github (ED25519)
256 SHA256:CbR35bEiKFo09/CR/TIe90+igGCmT0b62AEk/lH3u7I GitHub Login (ED25519)
4096 SHA256:hFkZijzFZFcNQ8ZbFqprMkXqUxtlQc1/QcYiLUWWliI Hetzner VPS node 1 (RSA)
256 SHA256:OVCt74ZnlkKr5VnJmIPkJWehdM9WHrPEuB7yY7D1w/0 Hetzner VPS node 0 (ED25519)

1Password Version: 1Password for Windows 8.10.56 (81056028)
Extension Version: Not Provided
OS Version: Windows 11; 24H2; Build 26100.2605
Browser: Not Provided

Comments

  • LeoCx1000
    LeoCx1000
    Community Member

    Oh and it works within an ssh sess with a forward agent:

    ❯cat ~/.ssh/config
    Host duckbot0
        HostName ---.--.-.---
        User --------
        ForwardAgent yes
    

  • LeoCx1000
    LeoCx1000
    Community Member

    Update

    git for windows installs an ssh client, so the solution was to tell it to use the one 1P accounts for:

    git config --global core.sshCommand "C:\\Windows\\System32\\OpenSSH\\ssh.exe"