ubuntu系统下访问github网站出现乱码,无法访问等问题

记录一个遇到的问题。
该问题一般由于IP设置问题导致,我们将重新编辑/etc/hosts.
首先,我们输入命令sudo vim /etc/hosts

在文件末尾加入:
140.82.114.25 alive.github.com 140.82.112.25 live.github.com 185.199.108.154 github.githubassets.com 140.82.112.22 central.github.com 185.199.108.133 desktop.githubusercontent.com 185.199.108.153 assets-cdn.github.com 185.199.108.133 camo.githubusercontent.com 185.199.108.133 github.map.fastly.net 199.232.69.194 github.global.ssl.fastly.net 140.82.112.4 gist.github.com 185.199.108.153 github.io 140.82.114.4 github.com 192.0.66.2 github.blog 140.82.112.6 api.github.com 185.199.108.133 raw.githubusercontent.com 185.199.108.133 user-images.githubusercontent.com 185.199.108.133 favicons.githubusercontent.com 185.199.108.133 avatars5.githubusercontent.com 185.199.108.133 avatars4.githubusercontent.com 185.199.108.133 avatars3.githubusercontent.com 185.199.108.133 avatars2.githubusercontent.com 185.199.108.133 avatars1.githubusercontent.com 185.199.108.133 avatars0.githubusercontent.com 185.199.108.133 avatars.githubusercontent.com 140.82.112.10 codeload.github.com 52.217.223.17 github-cloud.s3.amazonaws.com 52.217.199.41 github-com.s3.amazonaws.com 52.217.93.164 github-production-release-asset-2e65be.s3.amazonaws.com 52.217.174.129 github-production-user-asset-6210df.s3.amazonaws.com 52.217.129.153 github-production-repository-file-5c1aeb.s3.amazonaws.com 185.199.108.153 githubstatus.com 64.71.144.202 github.community 23.100.27.125 github.dev 185.199.108.133 media.githubusercontent.com

保存并退出。安装nscd ,输入命令sudo apt install nscd
重新启动nscd服务,sudo /etc/init.d/nscd restart
等上一分钟重启github网站就基本正常了。

你可能感兴趣的:(随手记,ubuntu,github,linux)