copilot网络连接问题

点击诊断按钮

输出诊断信息

复制代码
## GitHub Copilot Chat - Extension: 0.39.0 (prod) - VS Code: 1.111.0 (ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb) - OS: linux 6.8.0-101-generic x64 - Remote Name: ssh-remote - Extension Kind: Workspace - GitHub Account: locip123 ## Network User Settings:
json
  "http.proxy": "http://127.0.0.1:7897",
  "http.proxyStrictSSL": false,
  "http.systemCertificatesNode": true,
  "github.copilot.advanced.debug.useElectronFetcher": true,
  "github.copilot.advanced.debug.useNodeFetcher": false,
  "github.copilot.advanced.debug.useNodeFetchFetcher": true
Connecting to https://api.github.com: - DNS ipv4 Lookup: 20.27.177.116 (19 ms) - DNS ipv6 Lookup: Error (53 ms): getaddrinfo ENOTFOUND api.github.com - Proxy URL: http://127.0.0.1:7897 (0 ms) - Proxy Connection: Error (4 ms): connect ECONNREFUSED 127.0.0.1:7897 - Electron fetch: Unavailable - Node.js https: Error (4 ms): Error: Failed to establish a socket connection to proxies: PROXY 127.0.0.1:7897 at PacProxyAgent.<anonymous> (/home/elderbot/.vscode-server/cli/servers/Stable-ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb/server/node_modules/@vscode/proxy-agent/out/agent.js:120:19) at Generator.throw (<anonymous>) at rejected (/home/elderbot/.vscode-server/cli/servers/Stable-ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb/server/node_modules/@vscode/proxy-agent/out/agent.js:6:65) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) - Node.js fetch (configured): Error (11 ms): TypeError: fetch failed at node:internal/deps/undici/undici:14902:13 at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async n._fetch (/home/elderbot/.vscode-server/extensions/github.copilot-chat-0.39.0/dist/extension.js:5080:5229) at async n.fetch (/home/elderbot/.vscode-server/extensions/github.copilot-chat-0.39.0/dist/extension.js:5080:4541) at async u (/home/elderbot/.vscode-server/extensions/github.copilot-chat-0.39.0/dist/extension.js:5112:186) at async Zm._executeContributedCommand (file:///home/elderbot/.vscode-server/cli/servers/Stable-ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb/server/out/vs/workbench/api/node/extensionHostProcess.js:494:48672) Error: connect ECONNREFUSED 127.0.0.1:7897 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1637:16) Connecting to https://api.githubcopilot.com/_ping: - DNS ipv4 Lookup: 140.82.112.21 (5 ms) - DNS ipv6 Lookup: Error (5 ms): getaddrinfo ENOTFOUND api.githubcopilot.com - Proxy URL: http://127.0.0.1:7897 (0 ms) - Proxy Connection: Error (2 ms): connect ECONNREFUSED 127.0.0.1:7897 - Electron fetch: Unavailable - Node.js https: Error (3 ms): Error: Failed to establish a socket connection to proxies: PROXY 127.0.0.1:7897 at PacProxyAgent.<anonymous> (/home/elderbot/.vscode-server/cli/servers/Stable-ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb/server/node_modules/@vscode/proxy-agent/out/agent.js:120:19) at Generator.throw (<anonymous>) at rejected (/home/elderbot/.vscode-server/cli/servers/Stable-ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb/server/node_modules/@vscode/proxy-agent/out/agent.js:6:65) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) - Node.js fetch (configured): Error (12 ms): TypeError: fetch failed at node:internal/deps/undici/undici:14902:13 at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async n._fetch (/home/elderbot/.vscode-server/extensions/github.copilot-chat-0.39.0/dist/extension.js:5080:5229) at async n.fetch (/home/elderbot/.vscode-server/extensions/github.copilot-chat-0.39.0/dist/extension.js:5080:4541) at async u (/home/elderbot/.vscode-server/extensions/github.copilot-chat-0.39.0/dist/extension.js:5112:186) at async Zm._executeContributedCommand (file:///home/elderbot/.vscode-server/cli/servers/Stable-ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb/server/out/vs/workbench/api/node/extensionHostProcess.js:494:48672) Error: connect ECONNREFUSED 127.0.0.1:7897 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1637:16) Connecting to https://copilot-proxy.githubusercontent.com/_ping: - DNS ipv4 Lookup: 4.237.22.41 (7 ms) - DNS ipv6 Lookup: Error (15 ms): getaddrinfo ENOTFOUND copilot-proxy.githubusercontent.com - Proxy URL: http://127.0.0.1:7897 (1 ms) - Proxy Connection: Error (1 ms): connect ECONNREFUSED 127.0.0.1:7897 - Electron fetch: Unavailable - Node.js https: Error (3 ms): Error: Failed to establish a socket connection to proxies: PROXY 127.0.0.1:7897 at PacProxyAgent.<anonymous> (/home/elderbot/.vscode-server/cli/servers/Stable-ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb/server/node_modules/@vscode/proxy-agent/out/agent.js:120:19) at Generator.throw (<anonymous>) at rejected (/home/elderbot/.vscode-server/cli/servers/Stable-ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb/server/node_modules/@vscode/proxy-agent/out/agent.js:6:65) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) - Node.js fetch (configured): Error (10 ms): TypeError: fetch failed at node:internal/deps/undici/undici:14902:13 at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async n._fetch (/home/elderbot/.vscode-server/extensions/github.copilot-chat-0.39.0/dist/extension.js:5080:5229) at async n.fetch (/home/elderbot/.vscode-server/extensions/github.copilot-chat-0.39.0/dist/extension.js:5080:4541) at async u (/home/elderbot/.vscode-server/extensions/github.copilot-chat-0.39.0/dist/extension.js:5112:186) at async Zm._executeContributedCommand (file:///home/elderbot/.vscode-server/cli/servers/Stable-ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb/server/out/vs/workbench/api/node/extensionHostProcess.js:494:48672) Error: connect ECONNREFUSED 127.0.0.1:7897 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1637:16)

原因是远程copilot尝试走代理

修复方法;

点击

齿轮按钮

点击设置

点击edit as json

删除有关

复制代码
"http.proxy": "http://127.0.0.1:7897",
"http.proxyStrictSSL": false,
"github.copilot.advanced.debug.useElectronFetcher": true,
"github.copilot.advanced.debug.useNodeFetcher": false,
"github.copilot.advanced.debug.useNodeFetchFetcher": true

的内容

相关推荐
W6580341919 小时前
2026年AI编程工具实测横评:Claude Code v2.1、Cursor 3.0、Trae SOLO、Copilot、Windsurf 谁更好用?
python·copilot·ai编程
爱吃提升2 天前
VSCode AI编程万能提示词模板(适配Copilot/Codeium/Continue/豆包AI)
vscode·copilot·ai编程
咖啡星人k2 天前
GitHub Copilot 加入 Agent 浏览器:验证 Web 应用进入编码闭环
前端·人工智能·github·copilot·前端开发·ai agent
协享科技3 天前
2026 年 AI 表格工具怎么选:ChatGPT、原生 Copilot/Gemini 与公式助手
人工智能·chatgpt·excel·copilot
Tenifs3 天前
在 VS Code 中,你可以通过修改全局或项目目录下的 settings.json 文件来彻底关闭 GitHub Copilot
github·copilot
霸道流氓气质5 天前
Spring AI Alibaba Copilot 项目使用指南
人工智能·spring·copilot
风向决定发型d7825 天前
Github Copilot 实战应用与效能提升指南
log4j·github·copilot
Leinwin5 天前
技术视角深度对比:Google Gemini 与 Microsoft 365 Copilot 企业级 AI 办公架构解析
人工智能·microsoft·copilot
Aloudata5 天前
数据分析 Agent vs 数据分析师 Copilot:AI 数据分析正进入新阶段
大数据·人工智能·数据分析·copilot·指标平台·语义层
Summer-Bright6 天前
AI 软件简报 07.11-07.15:DeepSeek天价融资、Copilot用户叛逃、中国AI新规落地
人工智能·软件工程·copilot