I have seen similar behavior for self-hosted git servers, in my case the delay turned out to be due to ipv6 being broken on my end, then there was an attempt to use ipv6 first which timed out after a couple of minutes, then there was a fallback to ipv4 which worked. It was my ISP that was at fault for bad ipv6 support, nothing wrong with the git server.
Not saying that is the explanation in your case, but could be worth checking maybe.
@eliasr @Codeberg That sounds perfectly plausible as I had a similar issue with npm today after switching routers yesterday. Thanks; that’s likely it. I’ll go look into that further now.