When we use tools to access Github or download files directly, it’s fast, but when we try to clone github projects, it’s not as fast as we’d like. The reason is that git clones do not walk through the proxy interface.
Tools to be prepared: Agent tools
Step 1: Check the port number of the agent software. The port number varies with the software.
Step 2: Open the Git client and set up the proxy
The HTTP proxy:
Git config –global http.github.com.proxy https://127.0.0.1:8080
Git config –global https.github.com.proxy https://127.0.0.1:8081
Socks5 proxy mode:
Git config –global http.github.com.proxy socks5://127.0.0.1:8080
Git config –global https.github.com.proxy socks5://127.0.0.1:8081
Step 3: After downloading, cancel the agent
git config –global –unset http.proxy
git config –global –unset https.proxy