Campus network can not log in to github-change Hosts solved

1. Find the host file on the C drive

C:\Windows\System32\drivers\etc\hosts

2. Query IP address

GitHub: Where the world builds software · GitHub

github.global.ssl.Fastly.net ᐅ Learn more about Fastly

assets-cdn.Github.com ᐅ Learn more about Github

raw.Githubusercontent.com ᐅ Learn more about Githubusercontent (ipaddress.com)

 3. Remember the above ip address.

Modify the hosts file in C:\Windows\System32\drivers\etc (PS: If you do not have permission to modify, you can right-click, properties, security, modify permissions. Or copy the hosts file to the desktop, after modification, copy it to the original folder ), add the following paragraph to the hosts file:

140.82.112.4 github.com
199.232.69.194 github.global.ssl.fastly.net
185.199.108.153 assets-cdn.github.com
185.199.109.153 assets-cdn.github.com
185.199.110.153 assets-cdn.github.com
185.199.111.153 assets-cdn.github.com
185.199.108.133 raw.githubusercontent.com
185.199.109.133 raw.githubusercontent.com
185.199.110.133 raw.githubusercontent.com
185.199.111.133 raw.githubusercontent.com

4. Save the hosts file.

If it doesn't return to normal immediately, I need to refresh the DNS cache to tell the computer that my hosts file has been modified. How to refresh DNS cache under Windows:

Open cmd and enter:

ipconfig /flushdns

Re-open the Github website, and the website access should return to normal.


Reference link:

How to deal with the css that cannot be loaded on the Github website

I encountered a problem that github could not be opened anyway, and recorded the perfect solution

Guess you like

Origin blog.csdn.net/baidu_30506559/article/details/122004124