当前位置: 首页 > news >正文

Mac 打不开github解决方案

序言

github 时有打不开的情况,为此很是烦恼,这里分享一下如何解决这种问题,其实问题的本质是在访问github网页时无法通过github.com的二级域名进行动态域名解析。

解决方案

手动配置静态文件hosts,将该域名和IP的映射关系添加到静态文件中,在访问地址时会优先通过Hosts文件进行域名解析。

解决步骤

  1. 找到github.com域名对应的IP地址,输入网址:站长工具Dns查询 找出最快的IP地址
  2. 打开终端,输入 sudo vim /etc/hosts
  3. 追加或者更改 本地hosts文件,本次结合命令 i --> 添加ip --> esc --> :wq (i: 进入编辑模式,esc: 退出编辑模式,:wq 保存文件并退出)
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
199.232.4.133 raw.githubusercontent.com
192.30.253.119 gist.github.com
54.169.195.247 api.github.com
185.199.111.153 assets-cdn.github.com
151.101.76.133 raw.githubusercontent.com
151.101.108.133 user-images.githubusercontent.com
151.101.76.133 gist.githubusercontent.com
151.101.76.133 cloud.githubusercontent.com
151.101.76.133 camo.githubusercontent.com
151.101.76.133 avatars0.githubusercontent.com
151.101.76.133 avatars1.githubusercontent.com
151.101.76.133 avatars2.githubusercontent.com
151.101.76.133 avatars3.githubusercontent.com
151.101.76.133 avatars4.githubusercontent.com
151.101.76.133 avatars5.githubusercontent.com
151.101.76.133 avatars6.githubusercontent.com
151.101.76.133 avatars7.githubusercontent.com
151.101.76.133 avatars8.githubusercontent.com127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost
50.116.34.243 sublime.wbond.net
127.0.0.1       www.test.com
127.0.0.1       local.erp.com
127.0.0.1     activate.xmind.net
127.0.0.1     practivate.xmind.net
127.0.0.1     lm.licenses.xmind.net
127.0.0.1     lmlicenses.xmind.net
127.0.0.1     www.xmind.net
127.0.0.1     na1r.services.xmind.net
#GitHub Start140.82.113.3 github.com
140.82.121.3 github.com
140.82.121.4 github.com
140.82.112.3 github.com
140.82.114.4	github.com
20.27.177.113 github.com
20.248.137.48 github.com
20.200.245.247 github.com
20.205.243.166 github.com140.82.113.4 gist.github.com
199.232.5.194 github.global.ssl.fastly.net
185.199.109.153 assets-cdn.github.com
185.199.110.153 assets-cdn.github.com
185.199.111.153 assets-cdn.github.com
199.232.96.133 raw.githubusercontent.com
199.232.96.133 gist.githubusercontent.com
199.232.96.133 cloud.githubusercontent.com
199.232.96.133 camo.githubusercontent.com
199.232.96.133 avatars.githubusercontent.com 
199.232.96.133 avatars0.githubusercontent.com
199.232.96.133 avatars1.githubusercontent.com
199.232.96.133 avatars2.githubusercontent.com
199.232.96.133 avatars3.githubusercontent.com
199.232.96.133 avatars4.githubusercontent.com
199.232.96.133 avatars5.githubusercontent.com
199.232.96.133 avatars6.githubusercontent.com
199.232.96.133 avatars7.githubusercontent.com
199.232.96.133 avatars8.githubusercontent.com
103.228.130.27 http://github.global.ssl.fastly.net
#GitHub End

相关文章:

  • [pluginviteimport-analysis] vite 提示jsx语法报错
  • 《Kotlin核心编程》笔记:面向对象
  • 03 python循环语句
  • 7. 异常、断言及日志
  • 网络基础(五):网络层协议介绍
  • Crow:黑魔法 调用Rule绑定的handler_
  • 数据分享 I 全国市级商品房屋销售数据,shp/excel格式,2005-2020年数据
  • 【玩转TableAgent数据智能分析】利用TableAgent进行教育数据分析
  • 关于Pytorch和Numpy中的稀疏矩阵sparse的知识点
  • 模板方法模式(行为型)
  • 力扣每日一题:2132. 用邮票贴满网格图(2023-12-14)
  • ElementPlus中的分页逻辑与实现
  • 【算法】【动规】乘积为正数的最长子数组长度
  • 【期末复习向】n元gram的应用
  • CentOS 防火墙管理及使用的redis基本常用命令
  • iOS 系统授权开发
  • iOS仿今日头条、壁纸应用、筛选分类、三方微博、颜色填充等源码
  • JavaScript中的对象个人分享
  • Java方法详解
  • JS数组方法汇总
  • SpiderData 2019年2月23日 DApp数据排行榜
  • Sublime text 3 3103 注册码
  • vue2.0项目引入element-ui
  • 阿里云前端周刊 - 第 26 期
  • -- 查询加强-- 使用如何where子句进行筛选,% _ like的使用
  • 创建一个Struts2项目maven 方式
  • 基于游标的分页接口实现
  • 力扣(LeetCode)22
  • 使用Gradle第一次构建Java程序
  • 一个SAP顾问在美国的这些年
  •  一套莫尔斯电报听写、翻译系统
  • 用 Swift 编写面向协议的视图
  • 源码安装memcached和php memcache扩展
  • gunicorn工作原理
  • python最赚钱的4个方向,你最心动的是哪个?
  • Spring第一个helloWorld
  • ​总结MySQL 的一些知识点:MySQL 选择数据库​
  • (13)[Xamarin.Android] 不同分辨率下的图片使用概论
  • (17)Hive ——MR任务的map与reduce个数由什么决定?
  • (Matalb时序预测)PSO-BP粒子群算法优化BP神经网络的多维时序回归预测
  • (七)微服务分布式云架构spring cloud - common-service 项目构建过程
  • (十一)JAVA springboot ssm b2b2c多用户商城系统源码:服务网关Zuul高级篇
  • (一)使用Mybatis实现在student数据库中插入一个学生信息
  • (原創) 是否该学PetShop将Model和BLL分开? (.NET) (N-Tier) (PetShop) (OO)
  • (转)【Hibernate总结系列】使用举例
  • (转)linux自定义开机启动服务和chkconfig使用方法
  • .net core 连接数据库,通过数据库生成Modell
  • .net redis定时_一场由fork引发的超时,让我们重新探讨了Redis的抖动问题
  • .NET Remoting学习笔记(三)信道
  • .net 反编译_.net反编译的相关问题
  • .NET设计模式(8):适配器模式(Adapter Pattern)
  • .NET学习全景图
  • [100天算法】-每个元音包含偶数次的最长子字符串(day 53)
  • [ACTF2020 新生赛]Include
  • [AIGC] 使用Curl进行网络请求的常见用法