注意
GitHub网站是外网 国内进入很卡 通常需要dns中转一下 而那些中转服务器访问的多了也会卡 所以需要经常检测GitHub dns 然后更换中转服务器ip;
1.打开Dns检测网站
站长工具 | Dns查询 http://tool.chinaz.com/dns?type=1&host=github.com&ip=
2. 检测http://github.com 的dns
如下图: 我们可以使用台湾中华电信的 ip 52.192.72.89 作为中转
注意
每个人在不同的地方 与时间 查到的结果 不一样
3. 修改windows下host文件修改
hosts文件位置:C:\windows\system32\drivers\etc
添加一列 52.74.223.119 github.com 填写检测到的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
# GitHub Start
52.74.223.119 github.com
4.刷新 DNS 配置
window: win+r,输入CMD,回车
命令ipconfig /flushdns
//清除DNS缓存内容。
ipconfig /displaydns
//显示DNS缓存内容
2、linux
文件位置:/etc/hosts
扫描二维码关注公众号,回复:
13509367 查看本文章
命令:systemctl restart nscd
5.打开GitHub
进入调试 查看 网络