Git - configure proxy and unconfigure proxy

1. Configure proxy (make git go network proxy)

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

 Among them, 1080 is the port of the SOCKS proxy, and generally defaults to 1080, which can be viewed in the settings of the proxy tool

Address record:

https://www.cnblogs.com/alphainf/p/17150558.html


2. Cancel proxy configuration (git uses normal network)

//取消http代理
git config --global --unset http.proxy
//取消https代理 
git config --global --unset https.proxy

Address record:

Git commit or clone error fatal: unable to access 'https://github.com/tata20191003/autowrite.git/': Failed to connect

Guess you like

Origin blog.csdn.net/smile_otl/article/details/132228166