Search code examples
gitvpn

git secured by vpn is returning 403 only with my mobile hotspot


I'm trying to push / pull from a gitlab repository which is secured by a VPN.
I'm connected to my mobile hotspot.
I can access the gitlab repository from the web browser, I can even download the repository as a zip.

When I'm trying to pull, I have a 403 error (I'm not even asked for my credentials).
If I change to my colleague's hotspot, I'm asked for my credentials and everything works fine.

Do someone knows why everything could work using the browser, and not in CLI only using my hotspot?

Thanks


Solution

  • In the end I started to debug using a curl request that fails with my mobile hotspot and doesn't on a standard wifi connection. I saw that the difference stands in the usage of TLSv1.3 when it fails instead of TLSv1.2 when it works.

    I edited my APN settings on my phone (on Android: Settings > Mobile network > Clicked on my SIM > Access point names > Cicked on the APN details) to turn of IPv6 and force IPv4 for APN protocol (and also roaming APN protocol). After that, it's using TLSv1.2 and I don't receive a 403 anymore.

    Hope it can help someone else