首页 > 其他分享 >GitHub - 电脑无法访问GitHub

GitHub - 电脑无法访问GitHub

时间:2023-01-18 16:57:44浏览次数:33  
标签:githubusercontent GitHub 无法访问 电脑 151.101 github 108.133 185.199 com

通过下面网址查询最新的IP地址:
https://github.com.ipaddress.com

https://www.ipaddress.com

然后配置到host中

202103 IP地址为:140.82.112.3

windows:
Windows电脑有时打不开GitHub,修改host文件即可
https://www.jianshu.com/p/3eacebfc55ab
https://www.cnblogs.com/Java-Script/p/11090777.html

host文件修改方法:
找到host文件路径:

C:\WINDOWS\System32\drivers\etc
1
在最后添加host

#github
192.30.253.112 github.com
151.101.113.194 github.global.SSL.fastly.net

dns刷新,打开cmd:

ipconfig /flushdns

注:
192.30.253.112是查找的github的网址
151.101.113.194是查找github.global.ssl.fastly.net网址

另外一种方式

1.打开Dns检测|Dns查询 - 站长工具
2.在检测输入栏中输入http://github.com官网
3.把检测列表里的TTL值最小的IP输入到hosts里,并对应写上github官网域名

https://github.com.ipaddress.com

Mac :
host路径

/private/etc

hosts文件位置:/etc/hosts。

macOS系统下修改需要按照如下方式:

1:首先,打开(访达)Finder。
2:使用组合键Shift+Command+G打开"前往文件夹",输入框中输入/etc/hosts。
3:然后就会跳转到hosts文件位置。

注意:如果你使用VS Code,可以直接用VS Code修改和保存。
复制hosts文件到桌面上,鼠标右键右击它,选择「打开方式」—「文本编辑」,打开这个hosts文件,然后将你要修改的内容直接在里面修改就好了。

然后把你修改好的hosts文件替换掉:/etc/hosts 文件。

注意:如果弹出密码输入框,你需要输入你当前电脑登录账号的密码。

最后刷新缓存:

sudo killall -HUP mDNSResponder


添加网址到 host

# GitHub Start

192.30.253.112 Build software better, together
140.82.113.4 gist.github.com
151.101.184.133 assets-cdn.github.com
151.101.184.133 raw.githubusercontent.com
151.101.184.133 gist.githubusercontent.com
151.101.184.133 cloud.githubusercontent.com
151.101.184.133 camo.githubusercontent.com
151.101.184.133 avatars0.githubusercontent.com
151.101.184.133 avatars1.githubusercontent.com
151.101.184.133 avatars2.githubusercontent.com
151.101.184.133 avatars3.githubusercontent.com
151.101.184.133 avatars4.githubusercontent.com
151.101.184.133 avatars5.githubusercontent.com
151.101.184.133 avatars6.githubusercontent.com
151.101.184.133 avatars7.githubusercontent.com
151.101.184.133 avatars8.githubusercontent.com
199.232.96.133 user-images.githubusercontent.com

# GitHub End
# GitHub Start
140.82.114.3 github.com
140.82.114.4 gist.github.com
151.101.1.194 github.global.SSL.fastly.net
185.199.109.153 assets-cdn.github.com
185.199.108.133 raw.githubusercontent.com
185.199.108.133 gist.githubusercontent.com
185.199.108.133 cloud.githubusercontent.com
185.199.108.133 camo.githubusercontent.com
185.199.108.133 avatars0.githubusercontent.com
185.199.108.133 avatars1.githubusercontent.com
185.199.108.133 avatars2.githubusercontent.com
185.199.108.133 avatars3.githubusercontent.com
185.199.108.133 avatars4.githubusercontent.com
185.199.108.133 avatars5.githubusercontent.com
185.199.108.133 avatars6.githubusercontent.com
185.199.108.133 avatars7.githubusercontent.com
185.199.108.133 avatars8.githubusercontent.com
185.199.108.133 user-images.githubusercontent.com

# GitHub End

 

标签:githubusercontent,GitHub,无法访问,电脑,151.101,github,108.133,185.199,com
From: https://www.cnblogs.com/randamao666/p/17060186.html

相关文章