I have just installed Git For Windows, and created my SSH key using SSH through Cygwin. It seems to be working from command-line and the Git For Windows GUI, but now I want to use TortoiseGit. TortoiseGit uses a Putty-like SSH client by default but apparently GitHub only accepts (open)SSH, and I don't really know how to proceed. I will be doing a clean TortoiseGit install, I already have Cygwin and Git for Windows installed.
5 Answers
For anyone looking to change an existing TortoiseGit installation to use PuTTY rather than OpenSSH, simply right-click, -> TortoiseGit -> Settings -> Network, then change 'ssh.exe' to 'tortoiseplink.exe'. From then on, doing a push/pull should be using Pageant (and any keys you have set up in there) if you also have that running.

- 30,738
- 21
- 105
- 131

- 3,158
- 2
- 24
- 18
-
6it's `TortoiseGitPLink.exe` (for me) – vsync Oct 13 '14 at 12:40
The easiest way would be first installing TortoiseGit then msysgit with the setting SSH client to TortoisePLink. Use the TortoiseGit Puttykey generator to create a new keypair add your public key to GitHub.
Clone/create a new repository. In thee Tortoise repository settings, set your fullname and email. Then in remote menu under the Git configuration menu enter your clone URL and select your PuTTY key. GitHub works just fine with PuTTY keys. I have friends that use it, and I used it myself too.

- 30,738
- 21
- 105
- 131

- 20,023
- 2
- 20
- 30
-
Is it possible to change msysgit to use TortoisePLink after installation? If so how - then I could just create a new putty key. – Mr. Boy Apr 19 '12 at 12:46
-
You can do `cd ~ ; echo "GIT_SSH = "c:/path/to/tortoiseplink.exe"" > .profile` it should work but a clean reinstall and openssh without tortoise git or plink with tortoise git is better – Learath2 Apr 19 '12 at 13:09
-
I removed the apps to do a clean install - but when I installed Git for Windows (msysgit) this time, I don't get the step where it asks about the SSH executable. Some setting left behind maybe, I checked the main git dir was removed :( – Mr. Boy Apr 20 '12 at 13:13
-
Check either the environment variable or trr the other solution i provideds. – Learath2 Apr 20 '12 at 13:20
-
The ssh values may be left in `C:\Documents and Settings\
\.ssh\` - It's where mine ended up, and are separate from the Git for Windows (un)install. – Philip Oakley Apr 22 '12 at 22:16
1) Cygwin
Use the approach described in the article Working with SSH key passphrases.
A password will be asked for only once on the Cygwin session startup. !!! Before exiting the Cygwin session don't forget to kill the ssh-agent process (use ps for find process PID and kill -9).
We are using a separate approach for Cygwin, because Cygwin by some reason doesn't see processes started externally in a Windows environment.
2, 3) MsysGit, TortoiseGit
Useful link: http://dogbiscuit.org/mdub/weblog/Tech/WindowsSshAgent
Install MsysGit. Install TortoiseGit (check openssh instead of plink during installation). !!! Check systems variables. If there is GIT_SSH variable present - remove it.
Go to TortoiseGit -> Settings -> General.
Set the Git EXE path to <MsysGitHome>/bin. Set the external DLL path to <MsysGitHome>/mingw/bin.
Go to TortoiseGit -> Settings -> Network. Set the SSH Client property to <MsysGitHome>/bin/ssh.exe
Define system variable SSH_AUTH_SOCKS=C:\temp.ssh-socket
Start cmd.exe and execute following commands (since we installed MsysGit all following commands are accessible in cmd - <MsysGit>/bin is added to system PATH variable):
# The following command is required to execute for avoiding an address already bind message when ssh-agen is not started yet but .ssh-socket exists after previous agent session
rm "%SSH_AUTH_SOCK%"
# Starting ssh-agent
ssh-agent -a "%SSH_AUTH_SOCK%"
# Adding our openssh key
ssh-add "%USERPROFILE%\.ssh\id_rsa"
# Type password for your key
That's it. From that moment you can execute git push
, git pull
from TortoiseGit and MsysGit without a prompting passphrase.
When ssh-agent is no longer required you can kill it through Windows Task Manager.

- 30,738
- 21
- 105
- 131

- 154
- 1
- 5
This video by Ed Goad helped me out. It shows how to setup a PAS token and get it configured for git.exe and TortoiseGit.
Steps from the video include:
- Create PAS from GitHub Profile Settings | Developer Settings | Personal access tokens.
- Copy your PAS
- run a few commands:
git config --global user.name 'yourUser'
git config --global user.email 'youremail@domain.com'
git clone https://location/of/repo
- Username for 'https://github.com':
yourUser
- Password for 'https://yourUser@github.com':
Paste in your PAS here instead of your real password.
This Solution by Anmol Jain which works perfectly for me. He has posted solution for source tree which works for tortoise git also.
Steps:
- from github enterprise just copy the https link to clone
- in the local machine in tortoise git --> git clone --> in the URL make as below http://@git.example.com/BTS/fp-pro-license.git/ORG1/spring-project.git so you will be able to clone

- 861
- 1
- 12
- 20

- 1
- 4