github无法访问

1. 原因

    可能GitHub的IP经常变化,导致DNS无法解析

2. 查询IP

    The Best IP Address, Email and Networking Tools - IPAddress.com查询github.com的ip

3. 解决方法1:

    修改C:WindowsSystem32driversetchosthost,末尾添加:

140.82.113.4 github.com
140.82.112.4 github.com

    表示访问github时,会尝试两个IP是否可以访问。

4. 解决方法2:

    解决方法1需要修改文件,比较繁琐,也可以查询到IP之后直接访问,例如:

    140.82.114.4/xswang/xflow

原文地址:https://www.cnblogs.com/yyqng/p/15334964.html