Repository navigation
Description
Summary
On our private GHES host, we would like to install an APM package from a monorepo subpath with apm install <ref> only — similar to GitHub:
apm install github/awesome-copilot/skills/review-and-refactor --target copilotWe confirmed that the same style of command works on github.com.
On GHES, the equivalent command does not seem to work for us.
Reproduction
- Host:
ghe.example.com - Repo:
my-org/agent-skills-monorepo - Package path:
packages/skill-alpha
apm install "ghe.example.com/my-org/agent-skills-monorepo/packages/skill-alpha"[x] ghe.example.com/my-org/agent-skills-monorepo/packages/skill-alpha -- not accessible or doesn't exist
With --verbose, git ls-remote appears to target a URL that includes the subpath:
fatal: repository 'https://ghe.example.com/my-org/agent-skills-monorepo.git/packages/skill-alpha/' not found
The same result with an HTTPS URL that embeds the subpath:
apm install "https://ghe.example.com/my-org/agent-skills-monorepo.git/packages/skill-alpha"Repo root without subpath validates, but installs the wrong manifest (bundle with local path: deps):
apm install --dry-run "ghe.example.com/my-org/agent-skills-monorepo"What we hoped for
apm install ghe.example.com/my-org/agent-skills-monorepo/packages/skill-alpha…would update apm.yml and install packages/skill-alpha, e.g.:
dependencies:
apm:
- git: "https://ghe.example.com/my-org/agent-skills-monorepo.git"
path: packages/skill-alpha
ref: mainIf FQDN shorthand is hard to support on GHES, CLI flags such as --git / --path / --ref would also help.
Workaround we use today
We add object form to apm.yml manually, then run apm install. This works, but we were hoping to avoid editing apm.yml by hand.
Environment
- OS: macOS
- APM version: 0.18.0
- Auth:
gh auth login --hostname ghe.example.com(HTTPS clone works)
Related
- [BUG] Skills subpath for GitLab monorepo is not working #610 — similar symptom on GitLab; closed with manual
apm.ymledit - Support installing individual skills/agents from monorepo packages (including private repo support) #872 — monorepo subpath on GitHub
- ADO: full https:// URL with sub-path rejected by parser (shorthand and object form work) #1128 — ADO URL with embedded subpath (fixed)
- [BUG] Artifactory + GitLab subgroups:
apm installfails for 3+ segment project paths #1498 / fix(artifactory): deterministic boundary probe for nested GitLab paths #1472 — boundary probe for nested GitLab paths
Suggestion
- Install-time boundary probe for GHES / generic git hosts (like fix(artifactory): deterministic boundary probe for nested GitLab paths #1472 for Artifactory)
- Or
apm install --git/--path/--refto write object form toapm.yml - Clearer error when subpath is embedded in the git URL (mentioned in Support installing individual skills/agents from monorepo packages (including private repo support) #872)
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
github-actions commentedon Jun 5, 2026
Triage decision
accept
Proposed labels
Milestone
null (no open milestones verified)
Suggested next action
Apply the GHES boundary-probe pattern from #1472 (GitLab) to generic git hosts: probe with
git ls-remoteat progressively shorter path segments to find where the repository ends and the subpath begins.Suggested issue comment
Thanks for the clear reproduction and the related-issue references, KomTak001 (@KomTak001) -- linking #610, #872, #1128, and #1472 gives good context on the pattern of work already done here.
The root cause is that APM's FQDN parser currently treats
ghe.example.com/my-org/repo/packages/skill-alphaas a git URL with the subpath embedded, andgit ls-remotecannot resolve that. GitHub.com works because APM has special-casedgithub.comto parseowner/repo/subpathcorrectly; GHES and other generic git hosts do not yet get that treatment.The fix pattern already exists for GitLab (#1472) and ADO (#1128): a boundary probe that uses
git ls-remoteat progressively shorter path segments to find where the repository ends and the subpath begins. Extending this to GHES (and generic git hosts with a custom hostname) would fix your case.In the meantime, the workaround you already use (adding the object form to
apm.ymlmanually) is correct:This will also be the output format once GHES subpath parsing is fixed.
We are accepting this as a high-priority portability bug. If you can test a fix against your GHES instance, that would be very valuable.
Per-lens notes (collapsed)
DevX UX Expert -- User-Need Reviewer
The error message (
-- not accessible or doesn't exist) is misleading -- the repository exists and is accessible; the issue is URL parsing. A better error would say "Subpath in FQDN install refs is not yet supported for GHES; use the object form in apm.yml instead." The parity gap between GitHub.com and GHES is a significant usability issue for enterprise users: the same mental model should work on both hosts.Supply Chain Security Expert -- Risk-Surface Reviewer
The "repo root without subpath installs the wrong manifest" behavior is a correctness issue, not a security issue -- the correct repo is accessed, just the wrong package within it. The boundary-probe pattern (#1472) must include host-validation to ensure the probed GHES URL is the same host the user specified. No
theme/securityneeded;theme/portability+area/enterpriseis correct.OSS Growth Hacker -- Contributor-Tone Reviewer
KomTak001 (NONE association) did thorough research including related issues and a clear workaround. The reply acknowledges the related issue history to show these are known gaps being tracked, and offers the boundary-probe fix pattern as a concrete next step. Inviting them to test a fix against their GHES instance turns a bug report into a potential contribution.
Python Architect -- Architecture Reviewer
The GHES case maps cleanly onto the boundary-probe pattern from #1472. The resolver needs to: (1) detect non-github.com hosts, (2) apply a boundary probe (try
git ls-remotewith progressively shorter paths), (3) split the result into repo URL + subpath. This is a contained change in the URL resolver/parser, similar to the GitLab fix.status/acceptedis appropriate; no new design needed given the existing pattern.Doc Writer -- Documentation Reviewer
The install docs should document GHES subpath syntax once supported, and the object-form workaround should be documented now for GHES users.
area/docs-siterides as a secondary label. The related-issue references in the report suggest the docs have a gap on GHES support coverage.APM CEO -- Triage Arbiter
GHES subpath support is a high-value enterprise portability feature. The fix pattern exists (GitLab, ADO). Enterprise users blocked by this have a workaround but need the FQDN shorthand to work for broader adoption. Strategic: GHES support is a key differentiator for enterprise APM adoption; gaps here slow enterprise rollout.
theme/portability+area/enterprise+priority/highis correct.{ "decision": "accept", "decision_detail": "", "theme": "theme/portability", "areas": ["area/enterprise", "area/distribution", "area/docs-site"], "type": "type/bug", "status": "status/accepted", "priority": "priority/high", "preserved_labels": [], "milestone": null, "next_action": "Apply the GHES boundary-probe pattern from #1472 to generic git hosts: probe with git ls-remote at progressively shorter path segments to find repo boundary vs subpath." }KomTak001 commentedon Jun 5, 2026
Thank you for accepting the issue.
Yes, we will help you confirm the operation in the GHES environment for the correction.
Thank you for your help
test(install): pin GHES FQDN subpath contract end-to-end + add CHANGELOG
fix(install): support FQDN monorepo subpath on GHES hosts (closes #1673…