解决vscode中修改配置文件后,raw.githubusercontent.com不能连接的问题

解决vscode中修改配置文件后,raw.githubusercontent.com不能连接的问题

前言:

在vscode中修改了settings.json后,报出了raw.githubusercontent.com不能连接的错误。

Problems loading reference 'https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.53/cspell.schema.json#/definitions/OverrideSettings': Unable to load schema from 'https://raw.githubusercontent.com/streetsidesoftware/cspell/cspell%404.0.53/cspell.schema.json': Request vscode/content failed unexpectedly without providing any details."

参考文章:

vscode 使用中遇到的问题- 掘金

解决raw.githubusercontent.com无法连接问题 - CSDN博客

过程:

1vscode unknown Word cspell调整级别。把information切换为hint。

在这里插入图片描述

2查询这个网址:https://site.ip138.com/raw.githubusercontent.com/

在这里插入图片描述

3在命令提示符中ping这些IP地址。选择最长时间最短的。

我选了151.101.228.133

C:\Users\Administrator>cd c:\windows\system32

c:\Windows\System32>ping 151.101.108.133

正在 Ping 151.101.108.133 具有 32 字节的数据:
请求超时。
来自 151.101.108.133 的回复: 字节=32 时间=131ms TTL=53
来自 151.101.108.133 的回复: 字节=32 时间=132ms TTL=53
请求超时。

151.101.108.133 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 2,丢失 = 2 (50% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 131ms,最长 = 132ms,平均 = 131ms

c:\Windows\System32>ping 151.101.76.133

正在 Ping 151.101.76.133 具有 32 字节的数据:
来自 151.101.76.133 的回复: 字节=32 时间=120ms TTL=53
请求超时。
来自 151.101.76.133 的回复: 字节=32 时间=129ms TTL=53
来自 151.101.76.133 的回复: 字节=32 时间=139ms TTL=53

151.101.76.133 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 3,丢失 = 1 (25% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 120ms,最长 = 139ms,平均 = 129ms

c:\Windows\System32>ping 151.101.228.133

正在 Ping 151.101.228.133 具有 32 字节的数据:
来自 151.101.228.133 的回复: 字节=32 时间=75ms TTL=54
来自 151.101.228.133 的回复: 字节=32 时间=70ms TTL=54
来自 151.101.228.133 的回复: 字节=32 时间=70ms TTL=54
来自 151.101.228.133 的回复: 字节=32 时间=80ms TTL=54

151.101.228.133 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 70ms,最长 = 80ms,平均 = 73ms

c:\Windows\System32>ping 151.101.0.133

正在 Ping 151.101.0.133 具有 32 字节的数据:
来自 151.101.0.133 的回复: 字节=32 时间=71ms TTL=54
请求超时。
请求超时。
来自 151.101.0.133 的回复: 字节=32 时间=71ms TTL=54

151.101.0.133 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 2,丢失 = 2 (50% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 71ms,最长 = 71ms,平均 = 71ms

4配置 C:\Windows\System32\drivers\etc 本地hosts 文件。

有可能不能保存hosts文件。

参考文章:hosts文件在哪?什么修改?另附Windows7/8/10 Mac/iPhone原版hosts文件

找到hosts文件右键选择“属性-安全"勾选"可写(用户)”.然后后把下面这段代码复制进去。

#解决vscode中settings.json,报出了raw.githubusercontent.com不能连接的错误。
151.101.228.133 raw.githubusercontent.com

5保存重启vscode

结果

并没有直接成功。

看命吧。第三步找的那几个IP都不稳定。

在hosts文件中,我将151.101.228.133换为151.101.108.133。最后成功了。

猜你喜欢

转载自blog.csdn.net/weixin_42875245/article/details/107878230
今日推荐