对于国内的用户,下载 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.

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐