Git - SSH remotes with GitHub Desktop

后端 未结 2 1444
轻奢々
轻奢々 2021-02-08 17:29

I am using GitHub Desktop on Windows 10. I initially cloned a repo using its HTTPS URL, but now our organisation have advised that we must use the SSH URL instead. So I have cha

相关标签:
2条回答
  • 2021-02-08 17:47

    I was able to get it working by creating an ssh config file with the content similar to what is provided in this gist:

    https://gist.github.com/JoaquimLey/e6049a12c8fd2923611802384cd2fb4a

    The minimal content I needed to get it working was

    Host github.com
        IdentityFile /c/Users/username/.ssh/id_github
    

    When cloning the repository I had to use the URL option because the Github.com tab will use the HTTPS url.

    0 讨论(0)
  • 2021-02-08 18:08

    As more recently seen in "Permission failure cloning in Git in Windows", try and launch GitHub Desktop after:

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

    That will ensure GitHub Desktop to use the right OpenSSH ssh.exe, instead of an internal one, as seen in desktop/desktop issue 5641.

    0 讨论(0)
提交回复
热议问题