«

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

WAP站长网 发布于 阅读:36 SEO教程


在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,恢复正常。✌✌

codecopilotgithubgitgithub copilotvscodeivaapi记事本windowsstem管理员url