Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

GHE.com support broken for SSH/Git remote URLs

未关闭
#502 1 条评论 8 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
git, typescript, vscode
领域
devtools

调研方向

失败已在 src/git/repository.ts 第 81 行定位;使用文档中说明的 ghe.com SSH 远程仓库和企业设置复现该问题,然后检查该值是如何解析的。扩展能够针对 SSH/Git 远程仓库成功初始化且不出现 Invalid URL 错误,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug

Describe the bug

It appears that the implementation of https://github.com/github/vscode-github-actions/issues/457 through https://github.com/github/vscode-github-actions/pull/458 was broken by https://github.com/github/vscode-github-actions/pull/469 if you are not using http remote urls and instead use the SSH/Git remote urls, e.g. <company>@<company>.ghe.com:org/repo.git.

Log output:

Activating GitHub Actions extension...
Error getting GitHub context
Invalid URL
TypeError: Invalid URL
	at new URL (node:internal/url:818:25)
	at /home/gustav/.vscode-server/extensions/github.vscode-github-actions-0.27.2/dist/extension-node.js:1:1158030
	at async Promise.all (index 0)
	at async /home/gustav/.vscode-server/extensions/github.vscode-github-actions-0.27.2/dist/extension-node.js:1:1157669
	at async De (/home/gustav/.vscode-server/extensions/github.vscode-github-actions-0.27.2/dist/extension-node.js:1:1157518)
	at async os (/home/gustav/.vscode-server/extensions/github.vscode-github-actions-0.27.2/dist/extension-node.js:1:1339675)
	at async db.n (file:///home/gustav/.vscode-server/bin/488a1f239235055e34e673291fb8d8c810886f81/out/vs/workbench/api/node/extensionHostProcess.js:112:13386)
	at async db.m (file:///home/gustav/.vscode-server/bin/488a1f239235055e34e673291fb8d8c810886f81/out/vs/workbench/api/node/extensionHostProcess.js:112:13349)
	at async db.l (file:///home/gustav/.vscode-server/bin/488a1f239235055e34e673291fb8d8c810886f81/out/vs/workbench/api/node/extensionHostProcess.js:112:12805)

To Reproduce
Steps to reproduce the behavior:

  1. Set up a repo on a ghe.com instance. Add VS Code settings as follow:
    {
       "github-enterprise.uri": "https://<company>.ghe.com",
       "github-actions.use-enterprise": true
     }
    
  2. Check out the repository using the git/ssh remote:
    git clone <company>@<company>.ghe.com:org/repo.git
    
  3. The Github Actions extension will fail to initialize due to URL failing to parse <company>@<company>.ghe.com:org/repo.git as a URL which then throws an error which is not handled.

Screenshots

Extension Version
v0.27.2

Additional context

主要语言
TypeScript
星标
661
派生
214
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/vscode-github-actions 的其他 Issue

查看 github/vscode-github-actions 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。