VSCode中使用Github Copilot,报错 GitHub Copilot could not connect to server. Extension activation failed

在VSCode中使用Github Copilot ,出现报错 GitHub Copilot could not connect to server. Extension activation failed: “connect ETIMEDOUT xxxx”

问题描述

在VSCode中使用 Github Copilot 编程确实爽,一开始用就停不下来。

不过有时 Copilot 会莫名失效,出现 GitHub Copilot could not connect to server. Extension activation failed: “connect ETIMEDOUT xxxx”的问题,着实令人抓狂。

解决步骤

参考各种资料,发现修改hosts文件即可解决。

具体方法是:
进入C:\Windows\System32\drivers\etc 目录中,以管理员身份打开hosts文件,提示打开方式就使用记事本就行了。再hosts文件中加入:

# vscode copilot config
140.82.112.5 github.com
140.82.112.5 api.github.com

这样一段文字,保存。

重启VSCode,恢复正常。✌✌

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
青葱年少的头像青葱年少普通用户
上一篇 2023年12月13日
下一篇 2023年12月13日

相关推荐