谷动谷力

 找回密码
 立即注册
查看: 5859|回复: 0
打印 上一主题 下一主题
收起左侧

国内用户GitHub访问速度慢怎么办?

[复制链接]
跳转到指定楼层
楼主
发表于 2022-6-26 14:49:57 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
国内用户GitHub访问速度慢怎么办?[color=rgba(0, 0, 0, 0.3)]原创 晓宇  芯片之家


GitHub作为全球最大的同性交友网站,GitHub可谓是又爱又恨,爱的是太多非常棒的开源项目了,有很大的参考价值,也方便我们自己托管项目,恨的是这个网站的访问实在是太不给力了,基本是随缘了,不同城市不同网络都各不相同,用宽带,手机流量也各不相同,大部分是不怎么好的。最近发现一个叫做Fetch Github Hosts的项目,也许能帮到大家,这里只针对网络不好的同学哈,fetch-github-hosts是主要为解决研究及学习人员访问Github过慢或其他问题而提供的免费的Github hosts同步服务,项目开源,有写具体的使用方法,有需要的同学可以前往学习一下。

简单粗暴的方法

手动添加hosts


访问
https://hosts.gitcdn.top/hosts.txt这个网站,将网页的全部内容粘贴到你的hosts文件中

Linux / MacOS hosts
路径:/etc/hostsWindows hosts
路径:C:\Windows\System32\drivers\etc\host


这里也顺便贴出来,大家复制即可:

# fetch-github-hosts begin
140.82.112.26               alive.github.com
140.82.112.26               live.github.com
185.199.108.154             github.githubassets.com
140.82.112.21               central.github.com
185.199.111.133             desktop.githubusercontent.com
185.199.109.153             assets-cdn.github.com
185.199.108.133             camo.githubusercontent.com
185.199.108.133             github.map.fastly.net
146.75.113.194              github.global.ssl.fastly.net
52.192.72.89                gist.github.com
185.199.108.153             github.io
52.192.72.89                github.com
192.0.66.2                  github.blog
52.69.239.207               api.github.com
185.199.109.133             raw.githubusercontent.com
185.199.109.133             user-images.githubusercontent.com
185.199.111.133             favicons.githubusercontent.com
185.199.109.133             avatars5.githubusercontent.com
185.199.109.133             avatars4.githubusercontent.com
185.199.109.133             avatars3.githubusercontent.com
185.199.108.133             avatars2.githubusercontent.com
185.199.109.133             avatars1.githubusercontent.com
185.199.111.133             avatars0.githubusercontent.com
185.199.111.133             avatars.githubusercontent.com
52.193.111.178              codeload.github.com
52.216.177.203              github-cloud.s3.amazonaws.com
52.216.177.203              github-com.s3.amazonaws.com
52.217.91.148               github-production-release-asset-2e65be.s3.amazonaws.com
52.217.91.148               github-production-user-asset-6210df.s3.amazonaws.com
52.217.91.148               github-production-repository-file-5c1aeb.s3.amazonaws.com
185.199.109.153             githubstatus.com
64.71.144.211               github.community
52.237.112.130              github.dev
140.82.112.21               collector.github.com
13.107.42.16                pipelines.actions.githubusercontent.com
185.199.108.133             media.githubusercontent.com
185.199.108.133             cloud.githubusercontent.com
185.199.108.133             objects.githubusercontent.com
# last fetch time: 2022-06-11T23:00:02+08:00
# update url: https://hosts.gitcdn.top/hosts.txt
# fetch-github-hosts end


特别注意,在windows中,大家修改完hosts之后,直接保存不了,保存的时候先另存在桌面,再拖进去覆盖即可!


刷新生效:

Linux: /etc/init.d/network restartWindows: ipconfig /flushdnsMacos: sudo killall -HUP mDNSResponder

试试访问效果


开源仓库:
https://github.com/Licoy/fetch-github-hosts

GitHub镜像站
或者使用
Github镜像站
,国内可以加速访问GitHub的网站(GitHub加速),使用起来和官网没啥区别,只是域名不同而已。
  • https://hub.おうか.tw

  • https://hub.連接.台灣

  • https://hub.fastgit.xyz

  • https://cdn.githubjs.cf

  • https://gitclone.com


分享一些技术开发的方法工具分享给大家,如果觉得有用,请为我点赞!



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|深圳市光明谷科技有限公司|光明谷商城|Sunshine Silicon Corpporation ( 粤ICP备14060730号|Sitemap

GMT+8, 2024-4-25 22:49 , Processed in 0.075790 second(s), 36 queries .

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表