# Writing is not easy! If it works! Please like, bookmark and follow! Thank you very much!
Tips:
If you want to see a quick solution, please swipe directly to “[Rot] Solution”. But you would have missed a billion !!!!!
【 rot 】 reason
Have you ever visited GitHub, the world’s largest dating site, and encountered the following: 1. Suddenly, github was inaccessible. Whether you reboot your computer, reset the Internet, reset your brain, it’s not working. 2. Access to GitHub magically with expensive Green Web. 3. Failed to connect to github.com port 443: The Operation timed out.
As a professional developer, these mistakes are hard for you to make! Then you do a frantic Baidu, Google search and get the setup agent for Git
Git config --global https.proxy http://127.0.0.1:1080 git config --global http.proxy http://127.0.0.1:1080Copy the code
Just when you think you have a quick fix!! Reality is slap in the face!! Connect to 127.0.0.01 port 1080: Connection refused
Are you as close to the edge as I am?
If you’re in any of these situations, you’re in luck. This article can help you solve 90% of your problems.
The solution
1. Open https://github.com.ipaddress.com/ is as follows:
Write down the IP Address! Write down the IP Address! Write down the IP Address!
2. Open https://fastly.net.ipaddress.com/github.global.ssl.fastly.net#ipinfo is as follows:
Write down the IP Address! Write down the IP Address! Write down the IP Address!
3. Open https://github.com.ipaddress.com/assets-cdn.github.com is as follows:
Write down the IP Address! Write down the IP Address! Write down the IP Address!
4. Open the hosts file on your computer and write the following items at the end and save them
140.82.113.4 IP Address (figure 1) github.com 199.232.69.194 185.199.108.153 IP Address (figure 2) github.global.ssl.fastly.net (FIG. 3 the IP Address) assets-cdn.github.com 185.199.109.153(figure 3) Assets-cdn.github.com 185.199.111.153(IP Address of Figure 3) assets-cdn.github.comCopy the code
The effect is as follows:
5. On the terminal, enter the following command to refresh DNS (permission required)
sudo killall -HUP mDNSResponder; say DNS cache has been flushedCopy the code
Then witness the magical moment !!!!!
A little tip
Tip 1: I am using a Mac. The Hosts file on the Mac can be found in the following path: 1.Finder->Go->Go to Folder 2. Enter /etc/hosts to find the hosts. 3
Tip 2: the Hosts file does not work with the usual editor. You can use NotePad++, SubLineText, etc