Here are links to a few of the posts I looked at while trying to figure this out:
The important pieces to make sure you get it working are these:
- Be sure you choose the OpenSSH option when installing msysgit
- Be sure you choose the OpenSSH option when installing TortoiseGit
- create a .ssh/config file and enter something like the following
Host name_of_host_where_your_git_repo_is
User git
Hostname name_of_host_where_your_git_repo_is
Port port_number
PreferredAuthentications publickey
IdentityFile "/path/to/your/openssh/private/key"
And you should be good to go. I actually set up msysgit and my ssh config file first, then I made sure that I could connect and then I installed TortoiseGit.
Tips:
- If you created your private key using puttygen then you'll need to export it (using puttygen) as an OpenSSH key.
- While testing your connection you can use ssh -v git@github.com (or @ your own host even) to see what ssh is doing and to make sure it is finding your key correctly.
- If your openssh key is located at C:\users\myuser\keys\key.ssh then the path to your IdentityFile should be like this: /c/users/myuser/keys/key.ssh