The cause of

In order to change the name of your blog folder, you need to download the github repository to your local location. When using Git Clone, the speed is unbearably slow, so I Google some git Clone speed and record it for future reference.

Github is slow because DNS is contaminated, and as you know, proxies are probably the best way to solve github’s problem

Using the agent

The premise of using this method is that you have a ladder, which allows you to access Google normally. How to build the ladder is not described here. We assume that you have a ladder available, you can set Git to access through proxies.

At first, I used the v2Ray global mode. After git Clone, I found that the speed did not change. After Google, I found that the git command does not directly go to the global proxy, so I need to configure git config and read all commands before operation.

#Don't worry. It's just the beginning
#For socks5, port 1080 is changed to its own local proxy portGit config --global http.proxy socks5://127.0.0.1:1080 git config --global http.proxy socks5://127.0.0.1:1080 git config --global http.proxy socks5://127.0.0.1:1080
#HTTP protocol, port 1081 changed to its own local proxy portGit config --global http.proxy http://127.0.0.1:1081 git config --global HTTPS. Proxy https://127.0.0.1:1081Copy the code

The above configuration will cause all git commands to go through the proxy, but if you use a mix of domestic git repositories, or even local git repositories, this will change the speed from faster to slower.

Github is only configured for github to use the local proxy, leaving everything else unchanged.

#For socks5, port 1080 is changed to its own local proxy portGit config - global http.https://github.com.proxy socks5: / / 127.0.0.1:1080 git config - global https.https://github.com.proxy socks5: / / 127.0.0.1:1080
#HTTP protocol, port 1081 changed to its own local proxy portGit config - global http.https://github.com.proxy https://127.0.0.1:1081 git config - global https.https://github.com.proxy https://127.0.0.1:1081Copy the code

A few other related commands:

#Viewing All Configurations
git config -l
#Reset Proxy Settings
git config --global --unset http.proxy
git config --global --unset https.proxy
Copy the code

Take a look at the speed difference before and after using local agents:

Reference

  1. Speed up Github Clone
  2. Github Code Clone accelerated

The second point of this method, have not tried, do not know whether feasible, interested friends can try.

The original link