<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          GitHub無法訪問?訪問慢?一招即可搞定

          共 5082字,需瀏覽 11分鐘

           ·

          2021-03-25 23:32








          GitHub 是一個面向開源及私有軟件項目的托管平臺,程序員可以在上面探索感興趣的項目,幾乎是程序員的圣地。

          最近聽群里朋友說 GitHub 無法訪問或者訪問速度極其慢,經(jīng)常打開 GitHub 變成這樣:

          這怎么能行呢?無疑妨礙了我們的學(xué)習(xí)之路呀。

          下面我就來把我的解決方法和大家說下:

          下載 SwitchHosts

          首先下載 SwitchHosts,可以更方便的切換 hosts,下載地址:https://github.com/oldj/SwitchHosts/releases

          考慮到 GitHub 訪問不穩(wěn)定,可以公眾號【武培軒】回復(fù)【hosts】獲取軟件安裝包。

          下面就需要用到 GitHub 上的一個項目:GitHub520,他可以定時提供最新的 hosts 配置來使訪問 GitHub 更加順暢。

          添加 hosts 規(guī)則

          接下來打開 SwitchHosts,然后添加 hosts 規(guī)則:

          • 方案名(Title)隨便寫
          • 類型(Type)選擇遠程
          • URL 地址欄輸入 https://cdn.jsdelivr.net/gh/521xueweihan/GitHub520@main/hosts
          • 自動更新建議選擇 1 小時一更新
          添加hosts規(guī)則

          其他方法

          若不想下載 SwitchHosts 等類似軟件,可以手動修改 hosts 文件,針對各個系統(tǒng)的文件位置是不同的,具體位置如下:

          • Windows 系統(tǒng):C:\Windows\System32\drivers\etc\hosts
          • Mac 系統(tǒng):/etc/hosts

          在 hosts 文件中添加如下內(nèi)容:

          185.199.108.154               github.githubassets.com
          140.82.114.21                 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.3                  gist.github.com
          185.199.108.153               github.io
          140.82.113.3                  github.com
          140.82.112.5                  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.113.10                 codeload.github.com
          52.217.78.204                 github-cloud.s3.amazonaws.com
          52.216.162.99                 github-com.s3.amazonaws.com
          52.217.96.204                 github-production-release-asset-2e65be.s3.amazonaws.com
          52.217.97.236                 github-production-user-asset-6210df.s3.amazonaws.com
          52.217.194.41                 github-production-repository-file-5c1aeb.s3.amazonaws.com
          185.199.108.153               githubstatus.com
          64.71.168.201                 github.community
          185.199.108.133               media.githubusercontent.com

          如果已經(jīng)失效,可以公眾號【武培軒】回復(fù)【hosts】獲取最新的 hosts。

          激活生效

          大部分情況下是直接生效,如未生效可嘗試下面的辦法,刷新 DNS:

          1. Windows:在 CMD 窗口輸入:ipconfig /flushdns
          2. Linux 命令:sudo rcnscd restart
          3. Mac 命令:sudo killall -HUP mDNSResponder

          相信大家通過上述方法配置后,就可以順暢地訪問 GitHub 了!

          瀏覽 42
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  五月婷婷丁香在线观看视频麻豆 | 日本色播视频在线播放 | 大香蕉伊人免费在线观看 | 国产黄色三级 | 精品A∨一区二区E区 |