Error making clone with Git

Posted on

Question :

When I try to make a clone of a repository through Git Bash by command line I get this error, as in the image below:

I’m on a corporate network, could the firewall be blocking me?
Has anyone ever had anything like this?


Answer :

I had the same problem and found the following solution.

Error message:

ssh -v
OpenSSH_5.8p1, OpenSSL 1.0.0d 8 Feb 2011
debug1: Connecting to [] port 22.
debug1: connect to address port 22: Connection timed out
ssh: connect to host port 22: Connection timed out
ssh: connect to host port 22: Bad file number

You will see a bad file number message when you are in Windows using MINGGW shell and for linux users Timed out.


SSH is blocked on port 22, type:


$ nmap -sS -p 22

to see the following:

$nmap -sS -p 22
Starting Nmap 5.35DC1 ( ) at 2011-11-05 10:53 CET
Nmap scan report for (
Host is up (0.10s latency).
22/tcp ***filtered*** ssh

Nmap done: 1 IP address (1 host up) scanned in 2.63 seconds

As you can see the state is as Filtered, which means that something is blocking this. You can solve this by changing SSH to port 443, it is also important to change from to “” so you will be reporting to the webserver instead of the ssh server. here are the steps to solve:


(First of all make sure you’ve generated your keys as explained in link )

create the file


~ / .ssh / config

(The ssh config file is located in the user directory.) In Windows it will probably be in C: Users USERNAME.ssh config

Paste the following code into the created file:

User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

Save the file.

Run ssh:

$ ssh -T
    $ Enter passphrase for key ‘……….

Please note that you do not need to have username or port number.


Leave a Reply

Your email address will not be published. Required fields are marked *