GitHub加速 ,GitHub下載速度太慢,國內github訪問加速,github速度慢解決辦法


GitHub加速 ,GitHub下載速度太慢,國內github訪問加速,github速度慢解決辦法

1、訪問 https://www.ipaddress.com/ip-lookup

2、分別查詢以下 5個鏈接 對應的 IP地址,查詢一個之后,在下面的“Perform another IP Lookup”框里可以繼續查詢。

  1. github.com
  2. gist.github.com
  3. github.global.ssl.fastly.net
  4. assets-cdn.github.com
  5. raw.githubusercontent.com

assets-cdn.github.com 查詢得到如下四個鏈接,請使用cmd分別ping四個鏈接,查看訪問速度最快的(ctrl+C結束ping)

185.199.108.153

185.199.109.153

185.199.110.153

185.199.111.153

3、修改hosts文件,添加內容(因為每個人網絡環境不同,請務必自行采用本地查詢結果,不要直接復制!!!)

140.82.114.4 github.com
140.82.114.3 gist.github.com
199.232.69.194 github.global.ssl.fastly.net
185.199.109.153 assets-cdn.github.com
199.232.96.133 raw.githubusercontent.com
199.232.96.133 gist.githubusercontent.com
199.232.96.133 cloud.githubusercontent.com
199.232.96.133 camo.githubusercontent.com
199.232.96.133 avatars0.githubusercontent.com
199.232.96.133 avatars1.githubusercontent.com
199.232.96.133 avatars2.githubusercontent.com
199.232.96.133 avatars3.githubusercontent.com
199.232.96.133 avatars4.githubusercontent.com
199.232.96.133 avatars5.githubusercontent.com
199.232.96.133 avatars6.githubusercontent.com
199.232.96.133 avatars7.githubusercontent.com
199.232.96.133 avatars8.githubusercontent.com

windows系統的hosts文件的位置如下:C:\Windows\System32\drivers\etc\host

mac/linux系統的hosts文件的位置如下:/etc/hosts

因為需要管理員權限,無法直接在文件上修改,請復制hosts到桌面,更改之后再復制替換。

4.cmd運行以下代碼刷新DNS

ipconfig /flushdns

5.打開Github進行測試,成功!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM