1. 设置http代理:git config http.proxy socks5://127.0.0.1:1080

  2. 设置ssh代理:

    1
    2
    3
    
    Host github.com *.github.com
        ProxyCommand connect -S 127.0.0.1:1080 %h %p
        IdentityFile ~/.ssh/id_rsa