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

的内容

相关推荐
BBWEYY终身尊贵会员13 天前
2026年6月四款建站工具怎么选?BBWEYY、比文云、GitHub Copilot、Dreamweaver 简明对比
github·copilot·dreamweaver
MicrosoftReactor13 天前
技术速递|从一次性提示到标准化工作流:如何在 GitHub Copilot CLI 中使用自定义智能体
github·copilot·cli·智能体
为自己_带盐14 天前
DotNet项目接入Copilot SDK简单案例
copilot
小二·14 天前
AI 编程工具深度实战:从 Copilot 到 Coding Agent
人工智能·copilot
小雨青年16 天前
GitHub Copilot 上下文工程:让 AI 编程更接近真实项目
人工智能·github·copilot
A.说学逗唱的Coke16 天前
【大模型专题】AI Copilot 完整实践指南:VSCode + GitHub Copilot Agent 模式全攻略
人工智能·vscode·copilot
陈猪的杰咪17 天前
GitHub Copilot 2026计费新规:AI Credits消耗解析与节省策略
人工智能·ai·架构·github·copilot
hoaxxcj17 天前
AI编程2026:Copilot桌面应用发布,我们正在经历一场不可逆的范式转移
copilot·agent·ai编程·github copilot·编程工具
宝桥南山17 天前
GitHub Copilot - 尝试使用一下Azure Devops MCP server
microsoft·微软·github·aigc·copilot·devops
MicrosoftReactor17 天前
技术速递|提升 GitHub Agentic Workflows 的 Token 使用效率
ai·github·copilot·智能体