EveryInc/compound-engineering-plugin · error · Error
Failed to clone ${source}. ${stderr.trim()}
Error message
Failed to clone ${source}. ${stderr.trim()} What it means
During by-name installation the CLI shells out to `git clone <source> <tempdir>` via Bun.spawn. If git exits non-zero — bad URL, missing repo, no network, auth failure — the command surfaces git's stderr verbatim in this error so the underlying cause is visible.
Source
Thrown at src/commands/install.ts:341
function resolveGitHubSource(): string {
const override = process.env.COMPOUND_PLUGIN_GITHUB_SOURCE
if (override && override.trim()) return override.trim()
return "https://github.com/EveryInc/compound-engineering-plugin"
}
async function cloneGitHubRepo(source: string, destination: string, branch?: string): Promise<void> {
const args = ["git", "clone", "--depth", "1"]
if (branch) args.push("--branch", branch)
args.push(source, destination)
const proc = Bun.spawn(args, {
stdout: "pipe",
stderr: "pipe",
})
const exitCode = await proc.exited
const stderr = await new Response(proc.stderr).text()
if (exitCode !== 0) {
throw new Error(`Failed to clone ${source}. ${stderr.trim()}`)
}
}
View on GitHub (pinned to c9c10f8c75)
Solutions
- Read the stderr text embedded in the message — it is git's own diagnosis; fix that first.
- Verify the source URL: `git ls-remote <source>` (or check COMPOUND_PLUGIN_GITHUB_SOURCE if set).
- Check network/proxy connectivity to github.com; retry when offline.
- For private repos, configure credentials (gh auth login, ssh keys, or token-based HTTPS).
- Fall back to a local path: `install ./path/to/cloned/plugin`.
Example fix
// before (message tail: 'Repository not found') COMPOUND_PLUGIN_GITHUB_SOURCE=git@github.com:me/wrong-repo.git install compound-engineering // after unset COMPOUND_PLUGIN_GITHUB_SOURCE # use the default marketplace source install compound-engineering
Defensive patterns
Strategy: retry
Validate before calling
// Pre-flight: check the remote is reachable before install
const { exitCode } = Bun.spawnSync(["git", "ls-remote", source, "HEAD"])
if (exitCode !== 0) throw new Error(`Cannot reach ${source}; fix network/auth first`) Try / catch
try {
await install(pluginName)
} catch (e) {
if (e instanceof Error && e.message.startsWith("Failed to clone")) {
// e.message contains git's stderr; retry with backoff on transient network errors
await sleep(2000)
await install(pluginName)
} else throw e
} Prevention
- Run `git ls-remote <source>` before scripted installs to catch auth/network issues early.
- Configure credentials once (gh auth login / ssh keys) for private sources.
- Avoid typos in COMPOUND_PLUGIN_GITHUB_SOURCE; test it with ls-remote.
- Retry transient failures instead of reinstalling from a changed source.
When it happens
Trigger: Calling `install <plugin-name>` when the git clone of the source repo fails: repo does not exist or is private (auth needed), no network/DNS failure, COMPOUND_PLUGIN_GITHUB_SOURCE set to an invalid URL, git not on PATH produces its own error, or proxy/firewall blocks github.com.
Common situations: Offline or corporate-proxy environment; SSH vs HTTPS mismatch for private repos; expired credentials/token; COMPOUND_PLUGIN_GITHUB_SOURCE typo; rate limiting or VPN issues.
Related errors
- Failed to clone branch '${branch}' from ${source}. ${stderr.
- Failed to fetch branch '${branch}'. ${fetchErr.trim()}
- Could not find plugin ${pluginName} in ${source}.
- Failed to reset to origin/${branch}. ${resetErr.trim()}
- ${command} ${args.join(" ")} failed: ${detail}
AI-assisted analysis of EveryInc/compound-engineering-plugin@c9c10f8c75 (2026-08-31).
Data as JSON: /api/errors/8d6d5a606dd0a66e.
Report an issue: GitHub.