Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to solve the problem that you can't access github in China?

Shulou Source: shulou.com Published: 2022-05-31 13:26:09 10月03日 Update

This article mainly explains "how to solve the problem that you can't visit github in China". Friends who are interested might as well take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to solve the problem that you can't visit github in China".

The recent visit to GitHub is always unstable, often out of contact, and makes all kinds of mistakes (OpenSSL SSL_read: Connection was reset, errno 10054, Connection refused...).

The cause is probably that the IP of GitHub changes frequently (it may change several times a day). There is a problem with our local DNS parsing, and the solution is to query the IP of github and write it into our hosts file by hand.

Visit https://github.com.ipaddress.com/

IP Address is the IP address

Directory: C:\ Windows\ System32\ drivers\ etc

Open the hosts file

Add a line 140.82.112.4 github.com at the end (IP uses the latest IP you queried)

Get it done. Test it.

Note, hosts file, you can add multiple IP records to github.com, so when we visit github, we will try whether each IP can be accessed at once. If not, we will go to Internet to do DNS parsing.

It can be configured like this.

140.82.112.4 github.com140.82.113.4 github.com140.82.112.3 github.com140.82.114.4 github.com so far, I believe you have a deeper understanding of "domestic cannot visit github how to solve", might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: File query content learning no practical deeper one line interest method address multiple practical practical that is manual easy to operate method more friends Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Apple Shulou Information MySQL Docker