Windows解决scoop下载错误:raw.githubusercontent.com:443

命令行下载scoop:

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

报错:

MethodInvocationException: Exception calling “DownloadString” with “1” argument(s): “请求的名称有效,但是找不到请求的类型的数据。 (raw.githubusercontent.com:443)”

首先检查了一下代理,没有问题,因此不是代理的锅

然后ping了一下raw.githubusercontent.com,全部丢包,那么就是host解析的锅了

打开https://ipaddress.com/,搜索raw.githubusercontent.com


What IP addresses does raw.githubusercontent.com resolve to?
raw.githubusercontent.com resolves to 4 IPv4 addresses and 4 IPv6 addresses:
185.199.108.133
185.199.109.133
185.199.110.133
185.199.111.133
2606:50c0:8000::154
2606:50c0:8001::154
2606:50c0:8002::154
2606:50c0:8003::154
In what country are raw.githubusercontent.com servers located in?
raw.githubusercontent.com has servers located in the United States.
What webserver software does raw.githubusercontent.com use?
raw.githubusercontent.com is powered by "GitHub.com" webserver.

管理员身份打开文件C:\Windows\System32\drivers\etc\host

末端追加一行:

185.199.108.133  raw.githubusercontent.com

再测试一下ping通了

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

重新运行上面命令下载scoop,指令正常工作,scoop下载成功

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值