当前位置:   article > 正文

Mac 打不开github解决方案_mac github打不开

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 保存文件并退出)
  1. ##
  2. # Host Database
  3. #
  4. # localhost is used to configure the loopback interface
  5. # when the system is booting. Do not change this entry.
  6. ##
  7. 199.232.4.133 raw.githubusercontent.com
  8. 192.30.253.119 gist.github.com
  9. 54.169.195.247 api.github.com
  10. 185.199.111.153 assets-cdn.github.com
  11. 151.101.76.133 raw.githubusercontent.com
  12. 151.101.108.133 user-images.githubusercontent.com
  13. 151.101.76.133 gist.githubusercontent.com
  14. 151.101.76.133 cloud.githubusercontent.com
  15. 151.101.76.133 camo.githubusercontent.com
  16. 151.101.76.133 avatars0.githubusercontent.com
  17. 151.101.76.133 avatars1.githubusercontent.com
  18. 151.101.76.133 avatars2.githubusercontent.com
  19. 151.101.76.133 avatars3.githubusercontent.com
  20. 151.101.76.133 avatars4.githubusercontent.com
  21. 151.101.76.133 avatars5.githubusercontent.com
  22. 151.101.76.133 avatars6.githubusercontent.com
  23. 151.101.76.133 avatars7.githubusercontent.com
  24. 151.101.76.133 avatars8.githubusercontent.com
  25. 127.0.0.1 localhost
  26. 255.255.255.255 broadcasthost
  27. ::1 localhost
  28. 50.116.34.243 sublime.wbond.net
  29. 127.0.0.1 www.test.com
  30. 127.0.0.1 local.erp.com
  31. 127.0.0.1 activate.xmind.net
  32. 127.0.0.1 practivate.xmind.net
  33. 127.0.0.1 lm.licenses.xmind.net
  34. 127.0.0.1 lmlicenses.xmind.net
  35. 127.0.0.1 www.xmind.net
  36. 127.0.0.1 na1r.services.xmind.net
  37. #GitHub Start
  38. 140.82.113.3 github.com
  39. 140.82.121.3 github.com
  40. 140.82.121.4 github.com
  41. 140.82.112.3 github.com
  42. 140.82.114.4 github.com
  43. 20.27.177.113 github.com
  44. 20.248.137.48 github.com
  45. 20.200.245.247 github.com
  46. 20.205.243.166 github.com
  47. 140.82.113.4 gist.github.com
  48. 199.232.5.194 github.global.ssl.fastly.net
  49. 185.199.109.153 assets-cdn.github.com
  50. 185.199.110.153 assets-cdn.github.com
  51. 185.199.111.153 assets-cdn.github.com
  52. 199.232.96.133 raw.githubusercontent.com
  53. 199.232.96.133 gist.githubusercontent.com
  54. 199.232.96.133 cloud.githubusercontent.com
  55. 199.232.96.133 camo.githubusercontent.com
  56. 199.232.96.133 avatars.githubusercontent.com
  57. 199.232.96.133 avatars0.githubusercontent.com
  58. 199.232.96.133 avatars1.githubusercontent.com
  59. 199.232.96.133 avatars2.githubusercontent.com
  60. 199.232.96.133 avatars3.githubusercontent.com
  61. 199.232.96.133 avatars4.githubusercontent.com
  62. 199.232.96.133 avatars5.githubusercontent.com
  63. 199.232.96.133 avatars6.githubusercontent.com
  64. 199.232.96.133 avatars7.githubusercontent.com
  65. 199.232.96.133 avatars8.githubusercontent.com
  66. 103.228.130.27 http://github.global.ssl.fastly.net
  67. #GitHub End

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/713349
推荐阅读
相关标签
  

闽ICP备14008679号