作技术的咱们常常会访问github.com,有时出现github访问很是慢或者git clone速度很慢,git push也很慢javascript
缘由很简单:github被高高的墙屏蔽了。 因此解决方案就是手动把 cdn 和IP地址绑定一下,或者更换地址。java
一、 获取github地址git
访问 http://github.com.ipaddress.com/ 获取cdn域名以及ip地址github
二、 获取 global.ssl.fastly地址shell
http://github.global.ssl.fastly.net.ipaddress.com/ 获取cdn域名以及ip地址浏览器
三、 获取assets-cdn.github.com 地址(可选)服务器
https://github.com.ipaddress.com/assets-cdn.github.com网站
四、修改hosts映射.net
Windows下用管理员身份打开如下文件code
C:\Windows\System32\drivers\etc\hosts
在末尾添加上述获取到的地址,而后保存(2020-6-6)
140.82.114.3 github.com 199.232.69.194 github.global.ssl.fastly.net 185.199.108.153 github.com 185.199.109.153 github.com 185.199.110.153 github.com 185.199.111.153 github.com
打开CMD,输入如下命令,刷新一下DNS
ipconfig /flushdns
而后使用ping 命令试试
ping github.com
注意:若是经过此方法绑定以后,仍是没法访问,那么尝试删除掉host中新加的内容,关闭浏览器刷新DNS后再访问试试
在tampermonkey中安装脚本GitHub 镜像加速访问、下载,而后访问github时,页面上会出现镜像网站按钮,使用镜像网站中的地址进行clone
注意:镜像网站中的地址只能clone,没法push
输入你想查询的网址后面跟上.ipaddress.com,就能够查到域名的建立日期,服务器地址,每日访问量等信息
好比我想查询博客园的cnblgs.com,输入https://cnblogs.com.ipaddress.com/,获得信息以下:
Domain Summary
Global Traffic Rank | 120 |
---|---|
Estimated Visitors | 3.1 Million / Day |
Estimated Page Impressions | 10 Million / Day |
Domain Creation Date | November 12, 2003 |
Domain Age | 16 years, 6 months and 23 days (6,050 days) |
IP Address | 101.37.97.51 |
Web Server Location | ![]() |
想查询github.com 输入 https://github.com.ipaddress.com/,获得信息以下:
Domain Summary
Global Traffic Rank | 74 ▾9 |
---|---|
Estimated Visitors | 4.5 Million / Day |
Estimated Page Impressions | 27.1 Million / Day |
Domain Creation Date | October 9, 2007 |
Domain Age | 12 years, 7 months and 27 days (4,623 days) |
IP Address | 140.82.114.3 |
Web Server Location | ![]() |