Agent plugin marketplace mangles SSH `source.url` when user is not `git` (breaks GHE / self-hosted)
@connor4312 is already working on this.
Since May 29, 2026.
Assessment
This issue has not been assessed yet.
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.122.0 (Stable)
- OS Version: macOS 15 (Darwin arm64)
- Feature: Agent Plugins (Preview),
chat.plugins.marketplaces
Summary
If a marketplace plugin's source.url is an SSH URL with a user other than git, VS Code rewrites it to https:/HOST/PATH (single slash) and looks for it as a subdirectory of the marketplace clone. The plugin never installs.
The Copilot CLI clones the same marketplace.json fine using ssh:// or git+ssh://.
Repro
GHE instance whose SSH user is not git:
$ ssh git@acme.ghe.com
Permission denied (publickey).
$ ssh acme@acme.ghe.com
Hi user! You've successfully authenticated...
.github/plugin/marketplace.json:
{
"name": "agent-plugins",
"owner": { "name": "Example Org" },
"plugins": [
{
"name": "example-plugin",
"source": {
"source": "url",
"url": "acme@acme.ghe.com:team/example-plugin.git"
}
}
]
}
settings.json:
"chat.plugins.marketplaces": [
"acme@acme.ghe.com:org/agent-plugins.git"
]
Marketplace clones, plugin lists, then Install fails with:
Plugin source directory 'https:/acme.ghe.com/team/example-plugin.git'
not found in repository 'acme@acme.ghe.com:org/agent-plugins.git'.
Expected
VS Code clones the SSH URL as written, same as the CLI.
What works in CLI vs VS Code
source.url form |
CLI | VS Code |
|---|---|---|
acme@host:team/plugin.git (SCP) |
❌ "Invalid url" | ❌ mangled |
ssh://acme@host/team/plugin.git |
✅ | ❌ mangled |
git+ssh://acme@host/team/plugin.git |
✅ | ❌ mangled |
https://host/team/plugin.git |
✅ | ✅ (requires HTTPS creds) |
git@host:team/plugin.git |
n/a | n/a (auth fails: git user invalid) |
Clearing ~/Library/Application Support/Code/agentPlugins/ and toggling the URL format on re-add doesn't change the result.
Why this hits GHE specifically
The published marketplace schema only lists https:// and git@host:path. VS Code seems to enforce that with ^(https?://|git@), and when the URL doesn't match, it falls back to treating the string as a relative path inside the marketplace clone (note the wording "source directory ... not found in repository ...", which matches the RelativePath path; cf. #311725, #308504).
On a GHE where the SSH user is not git:
git@host:pathauthenticates as the wrong user.- Every other valid SSH URL (
user@host:path,ssh://,git+ssh://) is mangled before git ever sees it.
The single slash in https:/HOST/PATH looks like a path.normalize() somewhere collapsing //.
Fix
- Accept the following as
urlsources and pass them togit cloneverbatim:<user>@<host>:<path>(SCP, any user)ssh://<user>@<host>/<path>git+ssh://<user>@<host>/<path>
- Don't silently fall back to RelativePath when the URL doesn't match. Either reject with an explicit "unsupported URL scheme" or accept it.
- Reword the error so a misclassified URL doesn't read as a missing subdirectory.
Related
- #311725 — chat: fix installed url-source plugins after restart (RelativePath vs URL classification)
- #308504 — URL-source plugins silently uninstall on restart
- #313029 —
.gitsuffix requirement; non-spec URLs silently mishandled - #301111 — Azure DevOps URL rejection (same family)
Drafted with GitHub Copilot CLI (Claude Opus 4.7).
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·