解决Github上的资源无法下载(raw.githubusercontent.com’s server IP address could not be found.)问题[最简单的方法]

解决Github上的资源无法下载(raw.githubusercontent.com’s server IP address could not be found.)问题[修改hosts文件最简单的方法]

最近有小伙伴在下载我github上传的资源无法下载,因此我出一篇如何解决这个问题的方法。
在这里插入图片描述
当我们点击下载结果出现下面的页面显示无法下载
在这里插入图片描述
首先我们打开Windows开始旁边的搜索界面,搜索powershell,然后通过管理员权限运行(一定要右键管理员权限)
在这里插入图片描述
打开界面如下,我们进入C:\WINDOWS\system32\drivers\etc目录
在这里插入图片描述
接下来复制一份hosts文件 防止改坏 然后直接通过nodepad.exe打开hosts文件进行修改
在这里插入图片描述

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\WINDOWS\system32> pwd

Path
----
C:\WINDOWS\system32


PS C:\WINDOWS\system32> cd .\drivers\etc
PS C:\WINDOWS\system32\drivers\etc> ls


    Directory: C:\WINDOWS\system32\drivers\etc


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         3/19/2019  12:49 PM            824 hosts
-a----         12/7/2019   5:12 PM           3683 lmhosts.sam
-a----         3/19/2019  12:49 PM            407 networks
-a----         3/19/2019  12:49 PM           1358 protocol
-a----         3/19/2019  12:49 PM          17635 services


PS C:\WINDOWS\system32\drivers\etc> copy .\hosts .\hosts.bak
PS C:\WINDOWS\system32\drivers\etc> ls


    Directory: C:\WINDOWS\system32\drivers\etc


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         3/19/2019  12:49 PM            824 hosts
-a----         3/19/2019  12:49 PM            824 hosts.bak
-a----         12/7/2019   5:12 PM           3683 lmhosts.sam
-a----         3/19/2019  12:49 PM            407 networks
-a----         3/19/2019  12:49 PM           1358 protocol
-a----         3/19/2019  12:49 PM          17635 services

PS C:\WINDOWS\system32\drivers\etc> notepad.exe .\hosts

修改hosts文件内容如下
在hosts文件最后添加一行

199.232.68.133 raw.githubusercontent.com # comments. put the address here 

在这里插入图片描述
保存成功之后再次点击下载即可正常下载

猜你喜欢

转载自blog.csdn.net/qq_40695642/article/details/108909666