git configure proxy command

 

    Sometimes downloading things on github in China is very slow... One of the solutions is to set up a proxy for git

//查看当前设置

git config --global http.proxy

// 设置当前代理使用http或者socks 如果使用shadowsocks,那么就是socks5://127.0.0.1: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 --unset http.proxy

git config --global --unset https.proxy

PS:   global表示全局设置

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325242947&siteId=291194637