修改本地电脑系统 hosts 文件(PS:路径一般都是 C:\Windows\System32\drivers\etc ),在末尾添加三行记录并保存(需管理员权限,注意 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
64.233.183.103 code.google.com
# GitHub 加速
192.30.253.112 github.com
192.30.253.113 github.com
151.101.184.133 assets-cdn.github.com
151.101.185.194 github.global.ssl.fastly.net
用 “WIN +R” 快捷键打开运行窗口,输入命令:cmd 并回车进入命令行窗口,接着输入命令: ipconfig /flushdns 回车后执行刷新本地 DNS 缓存数据即可。