Git code always fails to commit

# Failed to connect to github.com port 443 after 21074 ms: Timed out

At first, I thought it was the network problem, so I didn’t pay attention to it, but I found it was wrong after submitting it for many times. The reason is that this should not happen when I use science to surf the Internet, so I tried the following steps to solve it

Step 1 (Cancel proxy):

    git config --global --unset http.proxy
    git config --global --unset https.proxy
Copy the code

Step 2 (update DNS):

ipconfig /flushdns
Copy the code

Step 3 (set up proxy):

Git config --global HTTPS. Proxy http://127.0.0.1:1080 git config --global HTTPS. Proxy https://127.0.0.1:1080Copy the code

The 127 address and port at the top are copied by the local network agent.

After modification, it is found that it is back to the fast speed.