Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 was able to 'git clone a repository using 'git clone' in my MS Terminal (the one start by using 'cmd').

git clone git+ssh://michael@

But when I do the SAME command under cygwin. It just hangs. I have checked they are using the same instance of 'git' so my question is why it does not work under 'cygwin'?

Thank you.

share|improve this question
Just guessing here, but it probably has to do with the ssh key. Make sure that a) you have a public key in your $CYGHOME/.ssh and b) that your server is aware of that key. – swasheck Apr 12 '12 at 20:47
I open cygwin terminal and then cd to '~' I assume it is the $CYGHOME. There is a '.ssh' directory, but it is empty. how can I create a public key to access my other machine? – michael Apr 12 '12 at 21:07
@michael: See section "Tunneling" on this page. – Bora Apr 12 '12 at 21:21
ssh-keygen -t rsa OR ssh-keygen -t dsa – swasheck Apr 12 '12 at 21:21
I did this, but it just hangs as well $ ssh-keygen -t rsa Enter file in which to save the key (/c/Programs/cygwin/home/michael/.ssh/id_rsa): id_rsa – michael Apr 12 '12 at 22:13

The problem is when you don't install Git on Cygwin and Cygwin uses your official installation of Git on your Windows machine. So, when you try any action that requires connection to an external repository (push, pull, clone) it just hangs. In my case I already had installed Git on my machine, so when I checked on Cygwin if Git was present using 'git --version' Git respond.

You need to run Cygwin installer again and install Git package.

Hope this helps someone.

share|improve this answer

This has always worked well for me

$ ssh-keygen -t rsa -C
Generating public/private rsa key pair.
Enter file in which to save the key (/home/Steven/.ssh/id_rsa):
Created directory '/home/Steven/.ssh'.

Enter passphrase (empty for no passphrase):
Enter same passphrase again:

Your identification has been saved in /home/Steven/.ssh/id_rsa.
Your public key has been saved in /home/Steven/.ssh/
The key fingerprint is:
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|                 |
|                 |
|.o  . . S        |
|+o.o + .         |
|o..oB +          |
| ..*=* o         |
|..Eo=oo          |


share|improve this answer

I created a user environment variable CYGHOME that points to my %USERPROFILE%, and I immediately stopped having this problem. It didn't make a new SSH keys or anything. Not like it should, either, since clone happens over HTTPS these days.

share|improve this answer
YES, thanks. I added also the varivale CYGHOME and it works fine now. I added also CYGWIN=tty ntsec just for ssh – user483188 Aug 13 '15 at 12:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.