-1

This is a first for me.... I'm trying to clone a repository from our GitLab server to a 3rd server. I have no issues cloning it anywhere else but this server. The output is the following:

myuser@localhost ~ $ ssh web@webserver -A
Last login: Thu May  2 16:23:29 2019 from 37-220-XXX-XXX.static.acetelecom.hu

0 ✓ web@webserver ~ $ git clone git@gitlab.mycompany.hu:developers/myproject.git
Cloning into 'myproject'...
ssh: connect to host 37.220.XXX.XXX port 22: Connection timed out
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


128 ✗ web@webserver ~ $ ping gitlab.mycompany.hu
PING gitlab.mycompany.hu (185.187.XX.XXX) 56(84) bytes of data.
64 bytes from 185.187.XX.XXX: icmp_seq=1 ttl=61 time=0.742 ms
64 bytes from 185.187.XX.XXX: icmp_seq=2 ttl=61 time=0.721 ms
64 bytes from 185.187.XX.XXX: icmp_seq=3 ttl=61 time=0.826 ms
64 bytes from 185.187.XX.XXX: icmp_seq=4 ttl=61 time=0.801 ms
^C
--- gitlab.mycompany.hu ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 0.721/0.772/0.826/0.050 ms

The 185.187.XX.XXX is actually the correct IP address, where my GitLab server sits at. The 37.220.XXX.XXX IP is my offices local IP address that can be seen from the outside world.

Any of you encountered anything similar ever? Why does git want's to download the repository from the IP where I came from?

  • Check your $HOME/.ssh/config file on the webserver. – Michael Hampton May 2 at 15:38
  • I have no custom config file there – Bert May 3 at 6:22
1

OK, problem solved.

It turned out to be that an old /etc/ssh/ssh_config file was used. Somebody have added a proxy to it towards our firewall, probably during testing and forgot to remove it.

Shame and sorry for the question.

  • Nothing to be ashamed of, it's the kind of thing that's happened to most sysadmins at one time or another. – Jenny D May 3 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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