
github.jpg
最近訪問github時(shí),發(fā)現(xiàn)圖片不可見,另外gist無(wú)法使用,而其他功能使用都很正常,為此煩惱了一陣,后來(lái)網(wǎng)上搜索發(fā)現(xiàn),修改host可以解決該問題:
# GitHub Start
192.30.253.112 github.com
192.30.253.119 gist.github.com
151.101.184.133 assets-cdn.github.com
151.101.184.133 raw.githubusercontent.com
151.101.184.133 gist.githubusercontent.com
151.101.184.133 cloud.githubusercontent.com
151.101.184.133 camo.githubusercontent.com
151.101.184.133 avatars0.githubusercontent.com
151.101.184.133 avatars1.githubusercontent.com
151.101.184.133 avatars2.githubusercontent.com
151.101.184.133 avatars3.githubusercontent.com
151.101.184.133 avatars4.githubusercontent.com
151.101.184.133 avatars5.githubusercontent.com
151.101.184.133 avatars6.githubusercontent.com
151.101.184.133 avatars7.githubusercontent.com
151.101.184.133 avatars8.githubusercontent.com
介于不少朋友曾今反饋過(guò)不知道host如何修改,這里介紹下:
windows下:
C:\Windows\System32\drivers\etc 打開 hosts 后加入上述內(nèi)容,編輯保存即可(會(huì)提示管理員權(quán)限打開,確認(rèn)即可)
mac下:
- 打開你的文件管理器也就是Finder ,Hosts在這個(gè)里面
- 接下來(lái)請(qǐng)按快捷鍵組合 Shift+Command+G 三個(gè)組合按鍵查找文件,并輸入 Hosts 文件的所在路徑:/etc/hosts
- 在打開的文件夾中找到「Hosts」文件夾
- 復(fù)制這個(gè)「hosts」文件到桌面上,鼠標(biāo)右鍵點(diǎn)擊/右擊它,選擇「打開方式」—「文本編輯」,打開這個(gè)「hosts」文件,然后將你要修改的內(nèi)容直接在里面修改就好了
- 將你修改好的 hosts 文件在復(fù)制回 Hosts 文件的所在(文件夾下)路徑:/etc/hosts 之下替換原始的 hosts 文件就好了,這樣你 Mac 系統(tǒng)下的 hosts 文件就被成功修改了
個(gè)人博客: [IT老五]
微信公眾號(hào):【IT老五(it-lao5)】,一起源創(chuàng),一起學(xué)習(xí)!