Pushing small changes to private repo takes incredibly long on GitLab.com


Hi all!

I didn’t know where this belongs so I decided to post it to this category.

I’m having issues pushing to a small private repository on GitLab.com using a SSH private key from a home network. Using GIT_SSH_COMMAND="ssh -v" git push, the command remains stuck at the following output:

OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /home/samvv/.ssh/config
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.

This has been happening for two days now; ever since I started using GitLab again. One time I left it running and I noticed that the command actually completed successfully after about 4 to 5 minutes. The first time this happened I was just pushing a small README, so network bandwidth cannot be the issue.

Interestingly, when I try to do a ssh git@gitlab.com, but instead use the IP obtained by nslookup, the delay is completeley gone. This makes me think that it is a DNS issue. The only question is how on Earth that is possible, because I can perfectly navigate the website using Brave.

Has anyone faced similar issues? If so, how were you able to resolve it?

Happy coding,

Quick update: I’ve found that it’s the IPv6 address that’s causing the trouble. nslookup resolves to an IPv6 address, too, and trying that one directly produces the same timeout. Still no idea how to fix it, though.

Another update: I just tried using my mobile’s Internet and it works perfectly, so it must have something to do with my home network. I’ll dig some deeper and post the solution here if it is of any interest.