Unable to login to Gitlab Registry on one of my VM's

Hello,

I am having an issue with logging in to Gitlab Registry on one VM’s (running on Hetzner). When I try to run docker login registry.gitlab.com and provide my e-mail address and access token (due to 2FA), I get the following error:

Error response from daemon: Get "https://registry.gitlab.com/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Also, journalctl shows:

Jul 23 20:12:49 web-docker dockerd[876]: time="2023-07-23T20:12:49.643349635Z" level=info msg="Error logging in to endpoint, trying next endpoint" error="Get \"https://registry.gitlab.com/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"
Jul 23 20:12:49 web-docker dockerd[876]: time="2023-07-23T20:12:49.643462076Z" level=error msg="Handler for POST /v1.43/auth returned error: Get \"https://registry.gitlab.com/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"

This issue only occurs on one of my VM’s. I have tried logging in with the same credentials and command on two other VM’s, and everything works fine there. Also, I am able to login to DockerHub on this machine, only Gitlab Registry is giving me an error.

DNS seems to be resolved the same on both machines, and there are no differences in the iptables configuration. Does anyone know how to troubleshoot this issue further?

Thanks in advance.