我的解决方案

打开C:\users\username\.gitconfig文件,最后加上:

1
2
3
4
5
6
[http]
proxy = socks5://127.0.0.1:1080
[https]
proxy = socks5://127.0.0.1:1080
[git]
proxy = socks5://127.0.0.1:1080