github訪問加速

對於國內的用戶,下載 github 上的代碼可能比較慢,可以在/etc/hosts 中增加如下配置, 可以顯著提升 github 的下載速度:

151.101.72.133 assets-cdn.github.com
151.101.73.194 github.global.ssl.fastly.net
192.30.253.113 github.com
11.238.159.92 git.node5.mirror.et2sqa

如果使用 Windows 系統,則是配置在“C:\Windows\System32\drivers\etc\hosts”文件中。 如果使用 Win10 Linux 子系統,建議也配置在“C:\Windows\System32\drivers\etc\hosts”文件中, 然後重啓 Linux 子系統,因爲 Linux 子系統中的/etc/hosts 文件是根據 Window 系統中的 “C:\Windows\System32\drivers\etc\hosts”這個文件生成的。 使用 Win10 Linux 子系統還可以通過刪除 Linux 子系統的/etc/hosts 文件中的這一行來阻止 Linux 子系統啓動的時候覆蓋修改過的 hosts 文件: # This file was automatically generated by WSL. To prevent automatic generation of this file, remove this line.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章