If you want to use Git on Windows it’s recommendet to connect it to putty using SSH.
Further if you authenticate with RSA keys instead of username/password, there may appear a few issues.
The most bothering one is the generation of the RSA keys. One way that works is the following:
- Install the used applications:
and optional TortoiseGit
Update 2018: I really do not recommend using TortoiseGit (and I never should have). There are way better tools to do this. Furthermore Atom and Visual Studio Code have good version controll features included.
- Use the
Git-Bashto create an RSA key (described on github)
- Convert the created private key (on default stored at
C:\Users\CURRENT_USER\.ssh\id_rsa with Puttygen) to a putty-private-key (.ppk) using
- In puttygen
Save Private Key. Use this key to authenticate on git Server
To be able to connect to the Git repository the user’s public key must be inserted into the authorized_keys.
Therefore the content of the public of the RSA key inside the unchanged file
filename.pub created by the
Git Bash must be appendet to the git-user’s keyring on the git server.
This code is described on the official Git-page.
su git cd cat /tmp/filename.pub >> ~/.ssh/authorized_keys chmod -R go= ~/.ssh
That’s it. Have fun working with Git.