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

的内容

相关推荐
Xi-Xu2 天前
低成本运行 Claude Code:通过 LiteLLM 接入 GitHub Copilot Chat API 的完整指南
人工智能·经验分享·github·copilot·生产力工具
coding侠客2 天前
Codeium:免费的 AI 补全工具,Copilot 的平替
人工智能·copilot
飞飞的AI实验室4 天前
2026 年 AI 辅助编程工具全景对比:Copilot、Cursor、Claude Code 与 Codex 深度解析
人工智能·ai·copilot·ai编程
FakeOccupational5 天前
【VSCODE 插件 调试】 Visual Studio Code + Continue + Ollama实现本地版 Cursor / Copilot
ide·vscode·copilot
min1811234566 天前
组织结构图导出PDF 高清无水印在线生成
网络·人工智能·架构·pdf·流程图·copilot
宝桥南山6 天前
GitHub Copilot - 尝试一下Plan mode
microsoft·微软·github·aigc·copilot·ai编程
jerwey6 天前
copilot:Configure chat session
copilot
花间相见6 天前
【AI开发】—— 山东省智能政策助手部署实战:从 0 到 1 上线与更新避坑指南
人工智能·copilot·ai编程
jerwey6 天前
Copilot Agents : Built-in agent(Agent、Plan、Ask) 与 Custom agent
copilot