1、打开GitHub官方CDN地址https://www.ipaddress.com/
2、查询以下三个链接的DNS解析地址
github.com
assets-cdn.github.com
github.global.ssl.fastly.net
3、修改系统Hosts文件(打开系统hosts文件需管理员权限)路径:
C:\Windows\System32\drivers\etc
修改对应域名的IP地址为 第二步查询到的IP地址(注意格式)
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
192.30.253.112 github.com
185.199.108.153 github.github.io
151.101.72.133 assets-cdn.github.com
151.101.185.194 github.global.ssl.fastly.net
4、刷新系统DNS缓存
Windows+X 打开系统命令行(管理员身份)或powershell
运行 ipconfig /flushdns
手动刷新系统DNS缓存。
网友评论