[Solved] Cannot login to gitlab's server

Hey folks,

TLDR: When you use git over ssh and you can’t login, just wait 1-3 minutes to let the connection time out after that your computer will try the IPv4, which was the address that worked for me.

I was unsure where to post this, because the gitlab.org organisation has many projects. I didn’t know where to create an issue in.

Anyway, I just installed a new linux distro, imported my ssh key. I was sure that the key was proper installed and working as I tried it on other servers.

I had this output with verbosity level 3:

ssh -T -vvv git@gitlab.com
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /home/eric/.ssh/config
debug1: /home/eric/.ssh/config line 2: Applying options for gitlab.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolving "gitlab.com" port 22
debug2: ssh_connect_direct
debug1: Connecting to gitlab.com [2606:4700:90:0:f22e:fbec:5bed:a9b9] port 22.

At this point it hanged up, every single time I tried. While I was reading another interesting gitlab issue, I noticed that on the other screen, where the console was open, there was movement. I looked closely and hurray it worked !

GIT_SSH_COMMAND='ssh -v' git clone --verbose git@gitlab.com:group/project/repo.git
Cloning into 'repo'...
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /home/eric/.ssh/config
debug1: /home/eric/.ssh/config line 2: Applying options for gitlab.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to gitlab.com [2606:4700:90:0:f22e:fbec:5bed:a9b9] port 22.

[At this point I was reading the gitlab issue]    

debug1: connect to address 2606:4700:90:0:f22e:fbec:5bed:a9b9 port 22: Connection timed out
debug1: Connecting to gitlab.com [172.65.251.78] port 22.
debug1: Connection established.

So as you can see there is an issue with the current IPv6.

I hope people who are facing the same issue are reading this at least. You just need to wait 1-3 minutes to let the connection time out.

KR
Eric

1 Like

Hey @goerens.eric! Welcome to our forum! and thanks for coming back to share the solution that worked for you!

Let me know if you need anything else! :blush: