Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

The reason why GitHub can't be accessed and its solution

Shulou Source: shulou.com Published: 2022-06-02 04:38:45 10月28日 Update

This article mainly explains the reasons and solutions for the lack of access to GitHub. The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn the reasons and solutions for the inaccessibility of GitHub.

GitHub is a hosting platform for open source and proprietary software projects, where programmers can explore projects of interest, almost a mecca for programmers.

Recently, I have heard friends in the group say that GitHub cannot be accessed or that the speed of access is extremely slow. It often turns into this when you open GitHub:

How can this work? It undoubtedly hinders our way of learning.

Let me tell you about my solution:

Download SwitchHosts

First download SwitchHosts, you can more easily switch hosts, download address: https://github.com/oldj/SwitchHosts/releases

Considering the instability of GitHub access, you can reply to [hosts] on the official account [Wu Peixuan] to get the software installation package.

Next, you need to use an item on GitHub: GitHub520, which can regularly provide the latest hosts configuration to make access to GitHub smoother.

Add hosts Rul

Next open SwitchHosts, and then add the hosts rule:

Scheme name (Title) Random write Type (Type) Select remote URL address bar enter https://cdn.jsdelivr.net/gh/521xueweihan/GitHub520@main/hosts automatic update recommendation choose 1 hour update

Add hosts rules other methods

If you do not want to download SwitchHosts and other similar software, you can manually modify the hosts file. The file location is different for each system, as follows:

Windows system: C:\ Windows\ System32\ drivers\ etc\ hostsMac system: / etc/hosts

Add the following to the hosts file:

185.199.108.154 github.githubassets.com

140.82.114.21 central.github.com

185.199.108.133 desktop.githubusercontent.com

185.199.108.153 assets-cdn.github.com

185.199.108.133 camo.githubusercontent.com

185.199.108.133 github.map.fastly.net

199.232.69.194 github.global.ssl.fastly.net

140.82.112.3 gist.github.com

185.199.108.153 github.io

140.82.113.3 github.com

140.82.112.5 api.github.com

185.199.108.133 raw.githubusercontent.com

185.199.108.133 user-images.githubusercontent.com

185.199.108.133 favicons.githubusercontent.com

185.199.108.133 avatars5.githubusercontent.com

185.199.108.133 avatars4.githubusercontent.com

185.199.108.133 avatars3.githubusercontent.com

185.199.108.133 avatars2.githubusercontent.com

185.199.108.133 avatars1.githubusercontent.com

185.199.108.133 avatars0.githubusercontent.com

185.199.108.133 avatars.githubusercontent.com

140.82.113.10 codeload.github.com

52.217.78.204 github-cloud.s3.amazonaws.com

52.216.162.99 github-com.s3.amazonaws.com

52.217.96.204 github-production-release-asset-2e65be.s3.amazonaws.com

52.217.97.236 github-production-user-asset-6210df.s3.amazonaws.com

52.217.194.41 github-production-repository-file-5c1aeb.s3.amazonaws.com

185.199.108.153 githubstatus.com

64.71.168.201 github.community

185.199.108.133 media.githubusercontent.com activation takes effect

In most cases, it takes effect directly. If it does not take effect, try the following methods to refresh the DNS:

Windows: enter: ipconfig / flushdnsLinux command: sudo rcnscd restartMac command: sudo killall-HUP mDNSResponder in the CMD window

I believe that through the above method of configuration, you can smoothly access GitHub!

Thank you for your reading. the above is the content of "the reasons and solutions for the inaccessibility of GitHub". After the study of this article, I believe you have a deeper understanding of the reasons and solutions for the inaccessibility of GitHub, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Methods reasons learning content files systems rules software projects smoothness location commands addresses situations programs programmers updates input selection configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux OPPO Reno NVidia Shulou Tech Info Xiaomi