一些时候我们无法使用github,例如nat机器,公共的IPv4,大家都使用一个IP,被github限制了次数,比如返回403状态。一种办法是在半夜人少的时候一次又一次的尝试,另一个方法是更改hosts文件

vi /etc/hosts
2a01:4f8:c010:d56::2 github.com
2a01:4f8:c010:d56::3 api.github.com
2a01:4f8:c010:d56::4 codeload.github.com
2a01:4f8:c010:d56::5 objects.githubusercontent.com
2a01:4f8:c010:d56::6 ghcr.io
2a01:4f8:c010:d56::7 pkg.github.com npm.pkg.github.com maven.pkg.github.com nuget.pkg.github.com rubygems.pkg.github.com