完美解决github网站访问速度慢

博客来源:

GitHub上面存储这大量的宝藏,同时也存储着我们的个人项目,对于我们来说,访问网站访问不了或者太慢真的是折磨

就仿佛巨大的宝藏摆在面前,只能一分一分的徒步拿一样……不能让我直接开运钞车搬吗???

经过百度发现,还是有很多加快访问速度的,这里分享一种实用的方法

大概步骤分为:

  1. 获取GitHub访问方式的真实地址
  2. 找到host配置文件,配置访问网站的地址
  3. 保存退出,查看是否成功

下面开始来吧

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、保存退出,查看是否成功

保存退出就好了,重新尝试访问网站试试,看看是否可行……我的是成功了,先记录一下,以后换电脑什么的都用的到

 

 

 

 

 

 

 

 

 

 

 

 

  • 6
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值