sanceray3
sanceray3

Reputation: 195

Unable to connect on GitLab.com since 2 days (HTTP, SSH...)

Let me explain my very strange problem. I have one server (Linux Debian Jessie) which had access to my git repository on gitlab.com

Two days ago, I tried to pull some modifications on this server with a simple git pull. I received an error message :

ssh: connect to host gitlab.com port 22: Connection timed out

Si I have done some tests

1. TELNET

To understand why, I have tried a telnet on 22 port = TIMEOUT

2. IPTABLES

I checked my iptables to be sure that SSH port was allowed. It is. If I try a telnet on another service for example like github.com, it works. So I'm allowed in OUTPUT on this port.

3. PING

I thought a ip translation problem. I have done a ping, I obtain this message :

PING 104.210.2.228 (104.210.2.228) 56(84) bytes of data. --- 104.210.2.228 ping statistics --- 87 packets transmitted, 0 received, 100% packet loss, time 86534ms

4. FAIL2BAN

I use fail2ban, so I have checked if gitlab was in jail address, but it seems not.

So my problem is that I can't reach gitlab.com

If I try from my local machine or from another server, I don't have this problem. It works.

I can't reach gitlab.com only from this server but I don't know why. Maybe someone has an idea which cans be very precious to help me ?

Upvotes: 4

Views: 5099

Answers (1)

Tushar
Tushar

Reputation: 3052

Probably some modification of firewall caused this. For a quick solution use http protocol instead of ssh. Change your url in the git config file to http.

git config --local -e

change entry of

url = [email protected]:username/repo.git , to

url = https://gitlab.com/username/repo.git

You need to give your username and password to authenticate yourself while making a push or pull though as it's http based.

Upvotes: 3

Related Questions