博客来源:
GitHub上面存储这大量的宝藏,同时也存储着我们的个人项目,对于我们来说,访问网站访问不了或者太慢真的是折磨
就仿佛巨大的宝藏摆在面前,只能一分一分的徒步拿一样……不能让我直接开运钞车搬吗???
经过百度发现,还是有很多加快访问速度的,这里分享一种实用的方法
大概步骤分为:
- 获取GitHub访问方式的真实地址
- 找到host配置文件,配置访问网站的地址
- 保存退出,查看是否成功
下面开始来吧
1、获取GitHub访问方式的真实地址
访问网站:https://github.com.ipaddress.com/
分别搜索:github.com 、 github.global.ssl.fastly.net 如下图所示
2、找到host配置文件,配置访问网站的地址
windows系统的hosts文件的位置如下:C:\Windows\System32\drivers\etc\hosts
mac/linux系统的hosts文件的位置如下:/etc/host在文件的最后添加——【我的如此,地址按照查出的做出相应修改】
140.82.112.4 GitHub.com
199.232.69.194 github.global.ssl.Fastly.net
我的host文件
# 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
140.82.112.4 GitHub.com
199.232.69.194 github.global.ssl.Fastly.net
3、保存退出,查看是否成功
保存退出就好了,重新尝试访问网站试试,看看是否可行……我的是成功了,先记录一下,以后换电脑什么的都用的到