jdx/mise · error
git clone failed with
Error message
git clone failed with {status} What it means
Bootstrap cloning ran `git clone <url> <checkout>` and git returned a non-zero exit status (embedded in the message). Common causes: no network, no access to the repo, or the destination already exists; git's own stderr shows immediately before this error.
Solutions
- Verify the URL: run `git clone <url> <target>` manually to see git's real error
- Ensure credentials are available (ssh key loaded, gh auth, or HTTPS token) for private repos
- Check network/proxy settings and that the checkout directory's parent is writable
- Confirm git is installed and on PATH
Defensive patterns
Strategy: retry
Validate before calling
git ls-remote <url> || throw new Error('repo unreachable') Try / catch
try { await clone(url) } catch (e) { if (/git clone failed/.test(e.message)) await retryWithBackoff(clone, 3) } Prevention
- Verify credentials and network before cloning private repos
- Pre-warm/verify the repo URL in setup steps
- Ensure the checkout parent directory exists and is writable
When it happens
Trigger: Cloning the bootstrap repository URL where git fails — bad URL, no network, missing auth for a private repo, non-writable checkout parent dir, or git not on PATH (which instead errors earlier).
Common situations: Private repository without credentials; typo'd URL; corporate proxy blocking github.com; disk/permission problems in the checkout location.
Understand the failure class
Background: "git command failed": what it means when a tool shells out to git and git exits non-zero — this error's family across 21 libraries.
Related errors
- git command failed with
- could not fetch setup repository using local Git…
- exists but is not a git checkout with an origin remote
- git failed with status
- has origin , expected
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/dd0d3bd84571e9d7.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/bootstrap.rs:4209
}
return Ok(true);
}
if dry_run {
miseprintln!("Would run: git clone {} {}", url, checkout.display_user());
return Ok(false);
}
if let Some(parent) = checkout
.parent()
.filter(|parent| !parent.as_os_str().is_empty())
{
std::fs::create_dir_all(parent)?;
}
let mut command = Command::new("git");
command.arg("clone").arg(url).arg(checkout);
crate::git::sanitize_git_command(&mut command);
let status = command.status()?;
if !status.success() {
bail!("git clone failed with {status}");
}
journal::note(format!("cloned {url} into {}", checkout.display_user()));
Ok(true)
}
fn bootstrap_hooks_enabled() -> bool {
!(config::Settings::no_hooks()
|| config::Settings::get().no_hooks.unwrap_or(false)
|| config::Settings::get().safe)
}
async fn run_bootstrap_hooks(
config: &Config,
hooks: &[hooks::BootstrapHook],
phase: BootstrapHookPhase,
dry_run: bool,
) -> Result<()> {
if !bootstrap_hooks_enabled() {View on GitHub (pinned to 533346cc37)