VSCode 的Github Copilot 插件报错:"Timed out waiting for authentication provider to register"

文章目录[隐藏]

自从用了 Github Copilot,基本上就离不开了,今天突然报错了,大概原因是我有两个 Github 账号,今天突然弹出让我登录,我用了另一个个账号登录了。

image 2.png

通过配置网络、设置 DNS、重启路由、电脑都没有解决问题。

点击"Show Output Log"会看到如下的错误日志:

[DEBUG] [proxy-socket-factory] [2023-08-24T14:12:58.962Z] Attempting to establish connection to proxy
[DEBUG] [proxy-socket-factory] [2023-08-24T14:12:58.965Z] Socket Connect returned status code,200
[DEBUG] [proxy-socket-factory] [2023-08-24T14:12:58.965Z] Successfully established tunneling connection to proxy
[ERROR] [default] [2023-08-24T14:14:57.360Z] GitHub Copilot could not connect to server. Extension activation failed: "Timed out waiting for authentication provider to register"
[ERROR] [default] [2023-08-24T14:15:17.572Z] GitHub Copilot could not connect to server. Extension activation failed: "Timed out waiting for authentication provider to register"
[ERROR] [default] [2023-08-24T14:17:33.649Z] GitHub Copilot could not connect to server. Extension activation failed: "Timed out waiting for authentication provider to register"

在 Github 上取消授权,重启 VS Code、卸载 Github Copilot 插件等还是同样的错误。

在 WebStorm 进行了尝试,是可以使用的,那么范围就缩小到是 VS Code 上的问题。

解决方式

如果你的 VS Code 左下角能看到下图所示的 Github 的登录,那么点击 Sign Out 重新登录。
image.png

但是你的这里没有账号登录,那么就继续往下看。

经过各种尝试,我想还是因为登录的问题,需要清空登录信息,重新用订阅了 Copilot 的账号登录。
找到如下目录

~/Library/Application Support/Code

比较粗暴的方式是全删了(需要重新配置主题等),你可以可以只删除下面的/User目录。

然后重启 VSCode,终于可以重新登录了
image.png

登录之后,问题得到解决。


已发布

分类

作者:

标签

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注