国内用户GitHub访问速度慢怎么办?老宇哥教你一招解决!
芯片之家
共 3477字,需浏览 7分钟
·
2022-06-13 22:36
微信公众号:芯片之家(ID:chiphome-dy)
GitHub
简单粗暴的方法
Linux / MacOS hosts路径:/etc/hosts
Windows 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 restart
Windows: ipconfig /flushdns
Macos: sudo killall -HUP mDNSResponder
试试访问效果
https://github.com/Licoy/fetch-github-hosts
https://hub.おうか.tw
https://hub.連接.台灣
https://hub.fastgit.xyz
https://cdn.githubjs.cf
https://gitclone.com
软件神器TortoiseGit,晓宇姐姐教你使用图形化方式管理单片机程序版本!
Git使用教程:最详细、最傻瓜、最浅显、真正手把手教!(建议收藏)
评论