Plugin incorrectly assumes that it is running in an environment where a "browser" is available, making enrollment impossible
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 58/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- vim
调研方向
从 :Copilot 设置入口开始,并在 xdg-open 不可用时复现该故障。跟踪调用浏览器的身份验证请求,然后将其与 issue 中描述的备用设备流程进行比较。完成的标准是:在没有可用的浏览器启动器时,设置仍能提供可用的说明,并且身份验证仍可完成。
由索引模型根据 Issue 内容生成。
描述
It seems that the GitHub Copilot Vim plug-in was developed with the assumption that it is running in a fully graphical desktop environment where tools such as "a browser" and xdg-open are available, making the use of the plug-in impossible unless these (otherwise not mentioned in the README!) features are satisfied.
System version(s):
❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.3 LTS
Release: 24.04
Codename: noble
❯ nvim -v
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377
77 ──────────────────────────────────────────────────────────────────────────────
78 vim.lsp: require("vim.lsp.health").check()
79
80 - LSP log level : WARN
81 - Log path: /home/whisperity/.local/state/nvim/lsp.log
82 - Log size: 4 KB
83
84 vim.lsp: Active Clients
85 - GitHub Copilot (id=1, root_dir=nil)
After installing the plug-in and executing :Copilot setup, the following happens:
Error detected while processing function copilot#Command[33]..function copilot#Command[25]..17[35]..<SNR>174_RequestWait:
line 2:
Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/lsp.lua:76: Vim:LSP[GitHub Copilot]: Error SERVER_REQUEST_HANDLER_ERROR: "Vim:E475: Invalid value for argument cmd:
'xdg-open' is not executable"
stack traceback:
[C]: in function 'nvim_command'
/usr/share/nvim/runtime/lua/vim/lsp.lua:76: in function 'err_message'
/usr/share/nvim/runtime/lua/vim/lsp.lua:1086: in function 'cb'
vim/_editor.lua:263: in function <vim/_editor.lua:262>
Press ENTER or type command to continue
Other tools, such as the gh cli shows an alternate flow to authenticate:
! First copy your one-time code: XXXX-YYYY
Press Enter to open https://github.com/login/device in your browser...
Opening this page and pasting the token and then running :Copilot status thankfully reports Ready, so the solution here would be to detect the failure of calling xdg-open or the browser and then creating an interactive message that leads the developer to open the browser on whatever other device they have and do the authentication flow there.
- 主要语言
- Vim Script
- 星标
- 11.7k
- 派生
- 812
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/copilot.vim 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
github/copilot.vim#303 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
github/copilot.vim#276 · 1 条评论 · 1 个 reaction ·
-
Neomarley 未关闭
难度 5/5 一周以上 新手友好度 1/100
github/copilot.vim#304 ·
-
Readme. 未关闭
难度 2/5 1-3 小时 新手友好度 20/100
github/copilot.vim#302 · 4 条评论 ·
-
Micky 未关闭
难度 5/5 一周以上 新手友好度 1/100
github/copilot.vim#301 ·
查看 github/copilot.vim 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
punkpeye/mcp-remote#369 ·
-
Mend: dependency security vulnerability untriaged
难度 1/5 1 小时以内 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 68/100
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
cisagov/vulnrichment#337 ·
-
bug DUP Reservations
难度 2/5 1-3 小时 新手友好度 68/100
bcgov/reserve-rec-public#896 ·