经常需要上github,找一个开源的软件,但由于众所周知的原因,github.com经常打不开,发现手工指定域名解析,还是可以访问到github.com的。
windows下编辑hosts文件,该文件在C:\Windows\System32\drivers\etc下,需要用管理员权限打开。
方案一:
把以下内容添加到hosts文件里,保存,然后就可以比较顺利的访问github.com了。
#Update Time: 2025-08-28 #Project Address: https://github.com/maxiaof/github-hosts #Update URL: https://raw.githubusercontent.com/maxiaof/github-hosts/master/hosts 140.82.114.26 alive.github.com 140.82.112.26 live.github.com 185.199.108.154 github.githubassets.com 140.82.114.21 central.github.com 185.199.111.133 desktop.githubusercontent.com 185.199.109.133 camo.githubusercontent.com 185.199.110.133 github.map.fastly.net 146.75.121.194 github.global.ssl.fastly.net 140.82.121.3 gist.github.com 185.199.110.153 github.io 140.82.121.3 github.com 192.0.66.2 github.blog 140.82.121.5 api.github.com 185.199.108.133 raw.githubusercontent.com 185.199.111.133 user-images.githubusercontent.com 185.199.108.133 favicons.githubusercontent.com 185.199.111.133 avatars5.githubusercontent.com 185.199.110.133 avatars4.githubusercontent.com 185.199.109.133 avatars3.githubusercontent.com 185.199.108.133 avatars2.githubusercontent.com 185.199.110.133 avatars1.githubusercontent.com 185.199.109.133 avatars0.githubusercontent.com 185.199.109.133 avatars.githubusercontent.com 140.82.121.9 codeload.github.com 52.217.123.41 github-cloud.s3.amazonaws.com 54.231.163.209 github-com.s3.amazonaws.com 16.15.177.109 github-production-release-asset-2e65be.s3.amazonaws.com 16.15.194.28 github-production-user-asset-6210df.s3.amazonaws.com 52.217.143.25 github-production-repository-file-5c1aeb.s3.amazonaws.com 185.199.108.153 githubstatus.com 140.82.112.18 github.community 51.137.3.17 github.dev 140.82.114.21 collector.github.com 13.107.42.16 pipelines.actions.githubusercontent.com 185.199.111.133 media.githubusercontent.com 185.199.111.133 cloud.githubusercontent.com 185.199.111.133 objects.githubusercontent.com #Github Hosts End
方案二
把以下内容添加到hosts文件里,保存。
# fetch-github-hosts begin 140.82.113.26 alive.github.com 140.82.113.26 live.github.com 185.199.111.154 github.githubassets.com 140.82.114.21 central.github.com 185.199.108.133 desktop.githubusercontent.com 185.199.109.133 camo.githubusercontent.com 185.199.111.133 github.map.fastly.net 151.101.77.194 github.global.ssl.fastly.net 20.205.243.166 gist.github.com 185.199.108.153 github.io 20.205.243.166 github.com 192.0.66.2 github.blog 20.205.243.168 api.github.com 185.199.108.133 raw.githubusercontent.com 185.199.108.133 user-images.githubusercontent.com 185.199.110.133 favicons.githubusercontent.com 185.199.110.133 avatars5.githubusercontent.com 185.199.111.133 avatars4.githubusercontent.com 185.199.111.133 avatars3.githubusercontent.com 185.199.110.133 avatars2.githubusercontent.com 185.199.111.133 avatars1.githubusercontent.com 185.199.108.133 avatars0.githubusercontent.com 185.199.111.133 avatars.githubusercontent.com 20.205.243.165 codeload.github.com 52.216.153.132 github-cloud.s3.amazonaws.com 16.182.37.129 github-com.s3.amazonaws.com 52.217.117.137 github-production-release-asset-2e65be.s3.amazonaws.com 3.5.30.114 github-production-user-asset-6210df.s3.amazonaws.com 3.5.16.107 github-production-repository-file-5c1aeb.s3.amazonaws.com 185.199.109.153 githubstatus.com 140.82.112.18 github.community 20.43.185.14 github.dev 140.82.112.22 collector.github.com 13.107.42.16 pipelines.actions.githubusercontent.com 185.199.108.133 media.githubusercontent.com 185.199.110.133 cloud.githubusercontent.com 185.199.111.133 objects.githubusercontent.com # last fetch time: 2025-08-29 10:38:18 # update url: https://hosts.gitcdn.top/hosts.txt # fetch-github-hosts end
声明:欢迎大家光临本站,学习IT运维技术,转载本站内容,请注明内容出处”来源刘国华教育“。如若本站内容侵犯了原著者的合法权益,请联系我们进行处理。