Git clone does not work in using Cygwin to run git

Solution 1:

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.

Solution 2:

This has always worked well for me

$ ssh-keygen -t rsa -C [email protected]
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/id_rsa.pub.
The key fingerprint is:
e2:83:fc:1c:62:b6:33:ec:69:80:86:f9:1a:5d:ab:8d [email protected]
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|                 |
|                 |
|.o  . . S        |
|+o.o + .         |
|o..oB +          |
| ..*=* o         |
|..Eo=oo          |
+-----------------+

ref