解决github访问不了的问题

github网站,以及其他的国外网站有时会遇到访问不了的情况,本文介绍怎么处理这样的问题。

一、站长工具查询DNS

访问 http://tool.chinaz.com/dns/ ,在输入框中填写 github.com,然后点击检测按钮,会列出响应ip

也可以通过 https://www.ipaddress.com/ 查询 IP

二、修改hosts文件

编辑C:\Windows\System32\drivers\etc\hosts文件,将列出的响应IP写入该文件中

  1. # github
  2. 52.74.223.119 github.com
  3. 203.208.39.99 github.com

三、刷新DNS缓存

在cmd命令行执行 ipconfig /flushdns ,刷新DNS缓存

  1. C:\Users\test>ipconfig /flushdns
  2.  
  3. Windows IP 配置
  4.  
  5. 已成功刷新 DNS 解析缓存。
     
    转自:https://blog.csdn.net/bowei026/article/details/107106503/
posted on 2021-01-06 00:05  pcant  阅读(442)  评论(0编辑  收藏  举报