Error making clone with Git

3

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?

    
asked by anonymous 14.07.2014 / 14:16

1 answer

5

I had the same problem and found the following solution.

Error message:

ssh -v [email protected]
OpenSSH_5.8p1, OpenSSL 1.0.0d 8 Feb 2011
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: connect to address 207.97.227.239 port 22: Connection timed out
ssh: connect to host github.com port 22: Connection timed out
ssh: connect to host github.com 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.

Problem:

SSH is blocked on port 22, type:

  

$ nmap -sS github.com -p 22

to see the following:

$nmap -sS github.com -p 22
Starting Nmap 5.35DC1 ( http://nmap.org ) at 2011-11-05 10:53 CET
Nmap scan report for github.com (207.97.227.239)
Host is up (0.10s latency).
PORT   STATE    SERVICE
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 github.com to "ssh.github.com" so you will be reporting to the webserver instead of the ssh server. here are the steps to solve:

Solution:

(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:

Host github.com
User git
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

Save the file.

Run ssh:

$ ssh -T github.com     $ Enter passphrase for key '..........

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

    
15.07.2014 / 14:11