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

的内容

相关推荐
JAVA_HOME_NEW17 小时前
macbook 配置claude code 通过copilot api调用 claude模型及gpt模型
gpt·copilot
ISkp3V8b42 天前
BMAD方法 v6 与 GitHub Copilot 在应用开发中的协同
github·copilot
AI成长日志2 天前
【实用工具教程】AI编程助手趋势全景:从Cursor到GitHub Copilot的实战评测
github·copilot·ai编程
Jinkxs3 天前
告别996:GitHub Copilot将我的开发效率提升300%的实战记录
github·copilot
MicrosoftReactor4 天前
技术速递|使用 Copilot CLI 中的 /fleet 一次运行多个智能体
人工智能·copilot·cli·智能体
小鹿软件办公4 天前
在 Windows 11 上结合 Microsoft Copilot 使用 Suno AI
windows·microsoft·copilot
吃一根烤肠5 天前
Python调试革命:用ChatGPT Copilot快速定位复杂bug
python·chatgpt·copilot
@BruceYan@5 天前
VSCode Insiders 添加 OpenAI 兼容模型
ide·vscode·编辑器·copilot·自定义模型
一叶飘零_sweeeet5 天前
IDEA 集成 GitHub Copilot 指南:解锁 10 倍编码效率的全链路实战
github·intellij-idea·copilot