我在VS Code使用Github Copilot时遇到了一个问题。报错信息如下:
[error] [default] Error sending telemetry FetchError: The pending stream has been canceled (caused by: unable to verify the first certificate)
具体信息:
2024-07-23 17:44:56.712 [error] [default] Error sending telemetry FetchError: The pending stream has been canceled (caused by: unable to verify the first certificate)
at fetch (c:\Users\Administrator\.vscode\extensions\github.copilot-1.214.0\node_modules\@adobe\helix-fetch\src\fetch\index.js:99:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at cachingFetch (c:\Users\Administrator\.vscode\extensions\github.copilot-1.214.0\node_modules\@adobe\helix-fetch\src\fetch\index.js:288:16)
at Fq.fetch (c:\Users\Administrator\.vscode\extensions\github.copilot-1.214.0\lib\src\network\helix.ts:92:22) {
type: 'system',
_name: 'FetchError',
code: 'ERR_HTTP2_STREAM_CANCEL',
errno: undefined,
erroredSysCall: undefined
}
而我最近一直可以正常使用Github Copilot
,为什么会出现这个错误呢?
经过仔细琢磨,我找到了原因。
我安装了一个工具FastGithub,它可以帮助我们以稳定和快速的方式访问Github
官网。当它工作时,有可能会影响或改变Github
的DNS
或代理(proxy
),从而导致Github Copilot
无法验证证书(certificate
)。
我们改变服务 fastgithub
和FastGithub.dnscrpyt.proxy
的启动类型为 手动,然后手动停止fastgithub
服务。
这之后,发现Github Copilot
可以正常工作了。
2024-07-24 12:11:18.321 [info] [fetcher] Using Helix fetcher.
2024-07-24 12:11:18.321 [info] [code-referencing] Public code references are enabled.
2024-07-24 12:11:18.946 [info] [fetchCompletions] request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 543 ms
2024-07-24 12:11:18.947 [info] [streamChoices] solution 0 returned. finish reason: [stop]
标签:FetchError,sending,Github,07,certificate,copilot,fetch From: https://www.cnblogs.com/lunyu/p/18320687Tip
如果想要继续使用
fastgithub
服务,手动启动 它即可,不过这会导致上述问题复现, 即目前二者不能同时工作。