素材巴巴 > 程序开发 >

VSCODE 设置同步network Error 问题

程序开发 2023-09-06 07:21:30

前言

这个问题等解决方法如下:
获取到github以及vscode-auth.github.com的ip,添加到host,随后使用命令行刷新host,重新认证即可

第一步,查看log文件,

打开 vscode,使用快捷指令ctrl(command)+shift+p,输入 log,选择开发人员:打开扩展日志文件夹

image.png

进入认证文件夹,打开日志,发现连接错误 ip 为 api.github.com

image.png

第二步,查询ip

打开网址:https://www.ipaddress.com ,查询到当前 vscode-auth.github.com 对应到的 ip ,我查询到了 4 个

image.png

第三步,编辑host

根据不同的系统(见下)找到 host 文件,并把查询到的 ip 添加进去,这里直接附上我添加找 host 上的内容,直接复制到你的 host 也是可以的,保险起见再去 https://www.ipaddress.com 里检查一下。


 140.82.113.3 http://github.com
 140.82.113.3 http://github.global.ssl.fastly.net185.199.108.153 vscode-auth.github.com
 185.199.109.153 vscode-auth.github.com
 185.199.110.153 vscode-auth.github.com
 185.199.111.153 vscode-auth.github.com140.82.114.6 api.github.com 
 

windows 的 host 文件地址

windows 的 host 文件一般在这:

C:WindowsSystem32driversetc
 

打开编辑就好了

mac 的 host 文件地址

见此文章

总结

总共三步,快乐地打工去吧~

参考文章

https://segmentfault.com/a/1190000042970365
https://www.cnblogs.com/willian/p/15932908.html
https://blog.csdn.net/xiaowanziwuha/article/details/107193470
https://baijiahao.baidu.com/s?id=1690545481327013192&wfr=spider&for=pc


标签:

上一篇: web前端就业前景-码动未来 下一篇:
素材巴巴 Copyright © 2013-2021 http://www.sucaibaba.com/. Some Rights Reserved. 备案号:备案中。