Github copilot在Visual Studio 2022中的激活问题

huangapple go评论91阅读模式
英文:

Github copilot activation woes in Visual Studio 2022

问题

我成功在Visual Studio Code中立即使用Copilot,但在同一台笔记本电脑上无法在Visual Studio 2022中使用。我安装了扩展程序,当我重新启动VS22并加载一个项目时,我会收到来自Copilot的消息框,要求使用激活码过程进行连接。然而,单击“确定”后,在输出窗口中会出现以下内容(当消息框再次出现时,我按下按钮第二次):

> GitHub Copilot 1.84.0.1 (v1.84.0.1@760da3695) [DEBUG] [agent]
> [2023-06-01T17:09:44.368Z] Agent service starting [DEBUG] [agent]
> [2023-06-01T17:09:44.714Z] Telemetry initialized GitHub Copilot Agent
> v1.84.0 [Error] An error occurred for
> 'RunOperation:SignInInitiateAsync':
> StreamJsonRpc.RemoteInvocationException: Request signInInitiate failed
> with message: self signed certificate in certificate chain    at
> StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__151`1.MoveNext()
> --- End of stack trace from previous location where exception was thrown ---    at
> System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
> System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
> task)    at
> GitHub.Copilot.CopilotClient.<RunOperation>d__20`1.MoveNext() [DEBUG]
> [agent] [2023-06-01T17:09:52.281Z] Agent service starting [DEBUG]
> [agent] [2023-06-01T17:09:52.337Z] Telemetry initialized [Error] An
> error occurred for 'RunOperation:RunOperation':
> StreamJsonRpc.RemoteInvocationException: Request signInInitiate failed
> with message: self signed certificate in certificate chain    at
> StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__151`1.MoveNext()
> --- End of stack trace from previous location where exception was thrown ---    at
> System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
> System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
> task)    at
> GitHub.Copilot.CopilotClient.<RunOperation>d__20`1.MoveNext() [DEBUG]
> [agent] [2023-06-01T17:09:53.585Z] Agent service starting [DEBUG]
> [agent] [2023-06-01T17:09:53.620Z] Telemetry initialized NotSignedIn
> [Error] An error occurred for 'RunOperation:SignInInitiateAsync':
> StreamJsonRpc.RemoteInvocationException: Request signInInitiate failed
> with message: self signed certificate in certificate chain    at
> StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__151`1.MoveNext()
> --- End of stack trace from previous location where exception was thrown ---    at
> System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
> System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
> task)    at
> GitHub.Copilot.CopilotClient.<RunOperation>d__20`1.MoveNext() [DEBUG]
> [agent] [2023-06-01T17:10:08.313Z] Agent service starting [DEBUG]
> [agent] [2023-06-01T17:10:08.346Z] Telemetry initialized [Error] An
> error occurred for 'RunOperation:RunOperation':
> StreamJsonRpc.RemoteInvocationException: Request signInInitiate failed
> with message: self signed certificate in certificate chain    at
> StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__151`1.MoveNext()
> --- End of stack trace from previous location where exception was thrown ---    at
> System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()    at
> System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
> task)    at
> GitHub.Copilot.CopilotClient.<RunOperation>d__20`1.MoveNext() [DEBUG]
> [agent] [2023-06-01T17:10:08.957Z] Agent service starting [DEBUG]
> [agent] [2023-06-01T17:10:08.971Z] Telemetry initialized NotSignedIn

我已经搜索过,并已经尝试将选项 > Github Copilot > 接受不受信任的证书授权设置为True。然而,仍然没有找到解决方法。

有人遇到这个问题吗?希望有解决方法可以解决这个问题?

英文:

I got Copilot to work immediately in Visual Studio Code but on the same laptop can't get it working in Visual Studio 2022. I installed the extension and when I restart VS22 and load a project I get the messagebox from Copilot to connect with the activation code procedure. Clicking OK however results in the following in the output window (pressed the button a seconde time when the messagebox appeared again):

> GitHub Copilot 1.84.0.1 (v1.84.0.1@760da3695) [DEBUG] [agent]
> [2023-06-01T17:09:44.368Z] Agent service starting [DEBUG] [agent]
> [2023-06-01T17:09:44.714Z] Telemetry initialized GitHub Copilot Agent
> v1.84.0 [Error] An error occurred for
> 'RunOperation:SignInInitiateAsync':
> StreamJsonRpc.RemoteInvocationException: Request signInInitiate failed
> with message: self signed certificate in certificate chain at
> StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__1511.MoveNext()
&gt; --- End of stack trace from previous location where exception was thrown --- at
&gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
&gt; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
&gt; task) at
&gt; GitHub.Copilot.CopilotClient.&lt;RunOperation&gt;d__20
1.MoveNext() [DEBUG]
> [agent] [2023-06-01T17:09:52.281Z] Agent service starting [DEBUG]
> [agent] [2023-06-01T17:09:52.337Z] Telemetry initialized [Error] An
> error occurred for 'RunOperation:RunOperation':
> StreamJsonRpc.RemoteInvocationException: Request signInInitiate failed
> with message: self signed certificate in certificate chain at
> StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__1511.MoveNext()
&gt; --- End of stack trace from previous location where exception was thrown --- at
&gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
&gt; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
&gt; task) at
&gt; GitHub.Copilot.CopilotClient.&lt;RunOperation&gt;d__20
1.MoveNext() [DEBUG]
> [agent] [2023-06-01T17:09:53.585Z] Agent service starting [DEBUG]
> [agent] [2023-06-01T17:09:53.620Z] Telemetry initialized NotSignedIn
> [Error] An error occurred for 'RunOperation:SignInInitiateAsync':
> StreamJsonRpc.RemoteInvocationException: Request signInInitiate failed
> with message: self signed certificate in certificate chain at
> StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__1511.MoveNext()
&gt; --- End of stack trace from previous location where exception was thrown --- at
&gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
&gt; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
&gt; task) at
&gt; GitHub.Copilot.CopilotClient.&lt;RunOperation&gt;d__20
1.MoveNext() [DEBUG]
> [agent] [2023-06-01T17:10:08.313Z] Agent service starting [DEBUG]
> [agent] [2023-06-01T17:10:08.346Z] Telemetry initialized [Error] An
> error occurred for 'RunOperation:RunOperation':
> StreamJsonRpc.RemoteInvocationException: Request signInInitiate failed
> with message: self signed certificate in certificate chain at
> StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__1511.MoveNext()
&gt; --- End of stack trace from previous location where exception was thrown --- at
&gt; System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at
&gt; System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
&gt; task) at
&gt; GitHub.Copilot.CopilotClient.&lt;RunOperation&gt;d__20
1.MoveNext() [DEBUG]
> [agent] [2023-06-01T17:10:08.957Z] Agent service starting [DEBUG]
> [agent] [2023-06-01T17:10:08.971Z] Telemetry initialized NotSignedIn

I've been searching around and tried already to flip Options > Github Copilot > Accept non-trusted certificate authorization to True. However still without being the solution.

Anyone facing this and, hopefully, has a workaround which works?

答案1

得分: 1

解决方案是按照此答案中提到的步骤进行操作:https://github.com/orgs/community/discussions/50484。

基本上,问题是 netskope 介入了流量,并且需要在我的笔记本上使用以下命令添加证书:

setx NODE_EXTRA_CA_CERTS "C:\temp\caadmin.netskope.com"

在我将证书 caadmin.netskope.com 保存在 C:\temp\ 后执行。

英文:

The solution was to follow the steps mentioned in this answer: https://github.com/orgs/community/discussions/50484.

Basically it turned out that netskope was in between for traffic and that the certificate needed to be added on my laptop with the command:

setx NODE_EXTRA_CA_CERTS &quot;C:\temp\caadmin.netskope.com&quot;

after I had saved the certificate caadmin.netskope.com under c:\temp.

huangapple
  • 本文由 发表于 2023年6月2日 01:12:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76384230.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定