回应模式 - No.67519840


No.67519840 - 技术宅


无标题无名氏No.67519840 只看PO

2025-11-27(四)18:33:44 ID:HlwyMyT 回应

请问在使用vscode上面的GitHub copilot时一直显示当前处于脱机状态,请连接到Internet以使用怎么办?我的账号没有问题,学生认证也做过了。梯子用的是FlClash,用管理员权限打开并开了全局代理和虚拟网卡。访问网站没有问题,但是始终没办法解决github copilot的问题。

无标题无名氏No.67520033

2025-11-27(四)19:05:02 ID: HlwyMyT (PO主)

另外我在vscode里面连接了wsl,插件是安装到Ubuntu中的状态

无标题无名氏No.67520058

2025-11-27(四)19:09:45 ID: HlwyMyT (PO主)

截图好像没发出来( ´ー`)

无标题无名氏No.67520063

2025-11-27(四)19:11:08 ID: YdWBvB8

用WSL的话你确定wsl也走代理了吗,在wsl里curl一下api.github.com试试

无标题无名氏No.67520129

2025-11-27(四)19:24:27 ID: HRGuesf

>>No.67520014
po挺实诚的, 就是日志打的大概不是copilot的日志.Ctrl+~把这个界面叫出来,里面有个output,右上角下拉框选到copilot的,看看哪个东西里面打了类似connection error的, 或者全发出来.发长内容你可以直接把它贴到pastebin上然后发链接.
我觉得这玩意连不上跟你vscode装wsl插件或者wsl没什么关系, 除非你这个vscode是安在wsl里的.
此外代理工具的日志也最好发一下.
解决问题的思路是这样的: 电脑--代理--github
连不上总归是这里有地方出问题了,所以首先要去看copilot插件是访问了什么地址, 这个地址的ip是什么, ip是不是copilot的ip(vscode的日志结合nslookup), 是的话有没有走代理(代理软件的日志), 走了代理为什么没走通(到这里就不归你管了, 要么是代理不行, 要么是github坏了)

无标题无名氏No.67520160

2025-11-27(四)19:30:45 ID: HlwyMyT (PO主)

>>No.67520063
我试着按照ai的指示用过CLI登录,虽然确实登陆上了我的github账号,但是我还是出现了以下的结果:
hdeyeheiw@LAPTOP-P9LO46BB:~/csapp/Lab3 Attack Lab/target1/target1$ curl https://api.github.com
{"message":"API rate limit exceeded for 67.159.54.210. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}
hdeyeheiw@LAPTOP-P9LO46BB:~/csapp/Lab3 Attack Lab/target1/target1$ curl -x http://127.0.0.1:7890 https://api.github.com
curl: (7) Failed to connect to 127.0.0.1 port 7890 after 0 ms: Couldn't connect to server
hdeyeheiw@LAPTOP-P9LO46BB:~/csapp/Lab3 Attack Lab/target1/target1$ curl -x socks5://127.0.0.1:7890 https://api.github.com
curl: (7) Failed to connect to 127.0.0.1 port 7890 after 0 ms: Couldn't connect to server
hdeyeheiw@LAPTOP-P9LO46BB:~/csapp/Lab3 Attack Lab/target1/target1$ git config --global http.proxy http://127.0.0.1:7891
hdeyeheiw@LAPTOP-P9LO46BB:~/csapp/Lab3 Attack Lab/target1/target1$ curl -x socks5://127.0.0.1:7891 https://api.github.co
m
curl: (7) Failed to connect to 127.0.0.1 port 7891 after 0 ms: Couldn't connect to server

无标题无名氏No.67520272

2025-11-27(四)19:49:35 ID: HlwyMyT (PO主)

>>No.67520129
谢谢指导!我基本对网络方面的知识不了解。这里的快捷键打开下面的栏目后我没有找到open,但是我在导出日志这里找到了GitHub copilot chat.log这个东西,很遗憾没找到代理工具的日志,pastebin说它在维护,因此我在此粘贴一下部分内容2025-11-27 19:17:21.751 [info] [GitExtensionServiceImpl] Initializing Git extension service.
2025-11-27 19:17:21.751 [error] Copilot extension not found
2025-11-27 19:17:21.751 [warning] Copilot API is undefined, unable to register context provider.
2025-11-27 19:17:21.751 [info] [GitExtensionServiceImpl] Successfully activated the vscode.git extension.
2025-11-27 19:17:21.751 [info] [GitExtensionServiceImpl] Enablement state of the vscode.git extension: true.
2025-11-27 19:17:21.751 [info] [GitExtensionServiceImpl] Successfully registered Git commit message provider.
2025-11-27 19:17:21.793 [info] Can't use the Electron fetcher in this environment.
2025-11-27 19:17:21.793 [info] Using the Node fetch fetcher.
2025-11-27 19:17:21.820 [error] Error fetching available embedding types: TypeError: fetch failed
2025-11-27 19:17:22.083 [info] Logged in as shadawwuegidua
2025-11-27 19:17:22.097 [info] FetcherService: node-fetch failed with error: fetch failed
2025-11-27 19:17:22.098 [info] FetcherService: node-fetch failed with error: fetch failed
2025-11-27 19:17:22.111 [info] FetcherService: node-http failed with error: Failed to establish a socket connection to proxies: PROXY 127.0.0.1:7890
2025-11-27 19:17:22.114 [error] TypeError: fetch failed
at node:internal/deps/undici/undici:13510:13
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async b3._fetch (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4418:24712)
at async uSn (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4418:27493)
at async pSn (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4418:26308)
at async Fx.fetch (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4418:29864)
at async MG.fetchCopilotTokenFromGitHubToken (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4043:25843)
at async Promise.all (index 0)
at async MG.doAuthFromGitHubTokenOrDevDeviceId (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4043:23665)
at async MG._auth (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4043:30990)
Error: connect ECONNREFUSED 127.0.0.1:7890
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1637:16): Failed to get copilot token
2025-11-27 19:17:22.114 [error] GitHub Copilot could not connect to server. Extension activation failed: "fetch failed"
2025-11-27 19:17:22.114 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-11-27 19:17:22.114 [error] TypeError: fetch failed
at node:internal/deps/undici/undici:13510:13
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async b3._fetch (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4418:24712)
at async uSn (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4418:27493)
at async pSn (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4418:26308)
at async Fx.fetch (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4418:29864)
at async MG.fetchCopilotTokenFromGitHubToken (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4043:25843)
at async Promise.all (index 0)
at async MG.doAuthFromGitHubTokenOrDevDeviceId (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4043:23665)
at async MG._auth (/home/hdeyeheiw/.vscode-server/extensions/github.copilot-chat-0.33.3/dist/extension.js:4043:30990)
Error: connect ECONNREFUSED 127.0.0.1:7890
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1637:16)
2025-11-27 19:17:22.114 [info] activationBlocker from 'languageModelAccess' took for 565ms
2025-11-27 19:17:22.114 [info] FetcherService: node-http failed with error: Failed to establish a socket connection to proxies: PROXY 127.0.0.1:7890
2025-11-27 19:23:54.976 [info] Logged in as shadawwuegidua

无标题无名氏No.67520282

2025-11-27(四)19:51:27 ID: HlwyMyT (PO主)

另外,我现在输入curl github的api的指令也有了结果,之前会显示curl https://api.github.com
{"message":"API rate limit exceeded for 67.159.54.210. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}
,现在的结果是hdeyeheiw@LAPTOP-P9LO46BB:~/csapp/Lab3 Attack Lab/target1/target1$ curl https://api.github.com
{
"current_user_url": "https://api.github.com/user",
"current_user_authorizations_html_url": "https://github.com/settings/connections/applications{/client_id}",
"authorizations_url": "https://api.github.com/authorizations",
"code_search_url": "https://api.github.com/search/code?q={query}{&page,per_page,sort,order}",
"commit_search_url": "https://api.github.com/search/commits?q={query}{&page,per_page,sort,order}",
"emails_url": "https://api.github.com/user/emails",
"emojis_url": "https://api.github.com/emojis",
"events_url": "https://api.github.com/events",
"feeds_url": "https://api.github.com/feeds",
"followers_url": "https://api.github.com/user/followers",
"following_url": "https://api.github.com/user/following{/target}",
"gists_url": "https://api.github.com/gists{/gist_id}",
"hub_url": "https://api.github.com/hub",
"issue_search_url": "https://api.github.com/search/issues?q={query}{&page,per_page,sort,order}",
"issues_url": "https://api.github.com/issues",
"keys_url": "https://api.github.com/user/keys",
"label_search_url": "https://api.github.com/search/labels?q={query}&repository_id={repository_id}{&page,per_page}",
"notifications_url": "https://api.github.com/notifications",
"organization_url": "https://api.github.com/orgs/{org}",
"organization_repositories_url": "https://api.github.com/orgs/{org}/repos{?type,page,per_page,sort}",
"organization_teams_url": "https://api.github.com/orgs/{org}/teams",
"public_gists_url": "https://api.github.com/gists/public",
"rate_limit_url": "https://api.github.com/rate_limit",
"repository_url": "https://api.github.com/repos/{owner}/{repo}",
"repository_search_url": "https://api.github.com/search/repositories?q={query}{&page,per_page,sort,order}",
"current_user_repositories_url": "https://api.github.com/user/repos{?type,page,per_page,sort}",
"starred_url": "https://api.github.com/user/starred{/owner}{/repo}",
"starred_gists_url": "https://api.github.com/gists/starred",
"topic_search_url": "https://api.github.com/search/topics?q={query}{&page,per_page}",
"user_url": "https://api.github.com/users/{user}",
"user_organizations_url": "https://api.github.com/user/orgs",
"user_repositories_url": "https://api.github.com/users/{user}/repos{?type,page,per_page,sort}",
"user_search_url": "https://api.github.com/search/users?q={query}{&page,per_page,sort,order}"

无标题无名氏No.67520287

2025-11-27(四)19:52:02 ID: HlwyMyT (PO主)

jp

无标题无名氏No.67520476

2025-11-27(四)20:14:28 ID: HRGuesf

>>No.67520272
2025-11-27 19:17:22.111 [info] FetcherService: node-http failed with error: Failed to establish a socket connection to proxies: PROXY 127.0.0.1:7890
目前的情况是他在尝试连接你的代理, 但是没有成功建立连接. 这说明你之前配置代理的操作是起作用了的, 但是你的代理工具并没有按照期望的工作, 他并没有监听,或者监听的并不是这个端口, 现在你需要给出你代理的设置情况.