How to solve the problem that github cannot be accessed

Method/steps

1. Problem description: Can connect to the Internet but cannot access github.com
Insert image description here

2. Find the hosts file. Address: C:\Windows\System32\drivers\etc (usually here)
Insert image description here
 

3. Do not modify the hosts file directly here. You need to copy and paste the hosts file to the desktop (or somewhere else you can find it)


4. Add three lines of records in the hosts file (# is a comment):

#github
192.168.23.122 github.com 
150.101.185.114 github.global.ssl.fastly.net

Note that different machines have different IPs. The above is the IP of my own computer. The specific IP can be checked through the following URL:

https://www.ipaddress.com/          //可能需要注册的

https://ip.tool.chinaz.com/github.com

Copy and paste the IP address into the newly added code in the hosts file and replace it

Insert image description here

Then save the file, copy and paste it here and replace the source file.

Insert image description here

Insert image description here

If the IP address is correct, follow the steps and you’ll be done.

Go to https://github.com/ and refresh the webpage. You will see that the long-lost project is back.

Guess you like

Origin blog.csdn.net/yzwfeng/article/details/134617166