Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use Git for the first time (I have used Mercurial before so I know the basic setup).

Everything is ready on the server side with the following properties:

  • User name: git
  • Domain:
  • Port: 222
  • Repo path: /home/git/repo.git
  • Public key saved in: /home/git/.ssh/authorized_key
  • Private key saved on my local Windows machine.
  • The key pair was generated with PuTTYgen

During installation of Git on my Windows machine I chose OpenSSH if that matters.

So my question is, how do I check out my repo?


share|improve this question
PuTTYgen generates the key in different format than OpenSSH expects. Do you have it in openssh format in %USERPROFILE%\.ssh\id_rsa and %USERPROFILE%\.ssh\ as OpenSSH expects? – Jan Hudec Feb 5 '14 at 12:39
Note that Git Gui has a menu for generating/showing the ssh key. That's the easiest way to generate it so that it is properly set up for git. – Jan Hudec Feb 5 '14 at 12:40

git clone username@server:/path/to/git/repo.git while you are in the folder where you want to check out to.

share|improve this answer
Thanks, but how do I specify my custom port (222) and where my private key is? – monoceres Dec 8 '11 at 16:38
These are probably the answers you need:… – Tim Dec 8 '11 at 16:41

Use [user@]host:relpath to clone over SSH, or ssh://[user@]host[:port]/abspath if you need to specify a different port.

For your current configuration:




With OpenSSH, you need to export your private key to OpenSSH format (using PuTTYgen), then either a) save it as ~/.ssh/id_rsa or ~/.ssh/id_dsa depending on the type, or b) save it anywhere you like, then edit ~/.ssh/config IdentityFile to point to the file. (a is better if you use the same key to connect everywhere; b is better if you use different keys for different servers.)

On Windows, the location is %USERPROFILE%\.ssh, and you'll probably need to create the .ssh directory yourself using Command Prompt.

If you had chosen PuTTY/plink, you could double-click the .ppk key file to load it to Pageant, and it would be used automatically.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .