Git客户端配置代理

操作步骤

  1. 指令如下:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

# 全局

git config --global http.proxy 'http://192.168.13.59:1080'
git config --global https.proxy 'http://192.168.13.59:1080'

git config --global http.proxy 'http://127.0.0.1:1080'
git config --global https.proxy 'http://127.0.0.1:1080'

git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

git config --global http.proxy 'http://192.168.28.118:2080'
git config --global https.proxy 'http://192.168.28.118:2080'

git config --global http.proxy 'http://192.168.31.199:1080'
git config --global https.proxy 'http://192.168.31.199:1080'

git config --global --unset http.proxy
git config --global --unset https.proxy

# 本地

git config --local http.proxy 'http://127.0.0.1:2080'
git config --local https.proxy 'http://127.0.0.1:2080'

git config --local http.proxy 'socks5://127.0.0.1:1080'
git config --local https.proxy 'socks5://127.0.0.1:1080'

git config --local --unset http.proxy
git config --local --unset https.proxy