Gitlab via IPv6 results in "Recv failure: Connection reset by peer"

I’m not often at home, so this haven’t bothered me much so far, but it exists for a longer time. Now I have some time I need to spend at home and can’t escape this problem any longer.

If I try to clone a repo from gnome gitlab, 8 out of 10 tries result in a Recv failure: Connection reset by peer

For faster results I usually test with git ls-remote

LANG=C git ls-remote --tags --refs https://gitlab.gnome.org/GNOME/tinysparql.git
fatal: unable to access 'https://gitlab.gnome.org/GNOME/tinysparql.git/': Recv failure: Connection reset by peer

If I now turn off IPv6 and go via v4 only it works fine.
By now I thought this is a general problem with my IPv6 connection, but I tried codeberg and archlinux gitlab repos with the same command (with turned off IPv4 connection, so it is forced to go IPv6) and both of them work for 100% of the tests.
So the Issue seems to be somewhere in between my connection and gnomes gitlab.

I’m also able to recreate this with curl directly

LANG=C curl 'https://gitlab.gnome.org/explore/groups'
curl: (35) Recv failure: Connection reset by peer

In case of curl to a site specifically it works most of the time. If it fails the -v output is

LANG=C curl -v 'https://gitlab.gnome.org/explore/groups'
* Host gitlab.gnome.org:443 was resolved.
* IPv6: 2a04:4e42:200::347, 2a04:4e42::347, 2a04:4e42:400::347, 2a04:4e42:600::347
* IPv4: 151.101.193.91, 151.101.129.91, 151.101.65.91, 151.101.1.91
*   Trying [2a04:4e42:200::347]:443...
* Connected to gitlab.gnome.org () port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: none
* Recv failure: Connection reset by peer
* OpenSSL SSL_connect: Connection reset by peer in connection to gitlab.gnome.org:443 
* closing connection #0
curl: (35) Recv failure: Connection reset by peer

I dont really know what else I could do except to turn off IPv6 for gnome.

Turns out its not just gnome, but some other sites as well. So please ignore this posting, I haven’t tried hard enough! :slight_smile: