To solve the problem, take these steps:
-
Find any socks5 proxy with a small ping (for example, here https://hidemy.name/ru/proxy-list/)
-
Create a file ~/.gitconfig that contains this:
[http]
proxy = socks5://PROXY_IP:PROXY_PORT[https]
proxy = socks5://PROXY_IP:PROXY_PORT