{"record":{"id":"dd0d3bd84571e9d7","repo":"jdx/mise","slug":"git-clone-failed-with-status","errorCode":null,"errorMessage":"git clone failed with {status}","messagePattern":"git clone failed with (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/bootstrap.rs","lineNumber":4209,"sourceCode":"        }\n        return Ok(true);\n    }\n    if dry_run {\n        miseprintln!(\"Would run: git clone {} {}\", url, checkout.display_user());\n        return Ok(false);\n    }\n    if let Some(parent) = checkout\n        .parent()\n        .filter(|parent| !parent.as_os_str().is_empty())\n    {\n        std::fs::create_dir_all(parent)?;\n    }\n    let mut command = Command::new(\"git\");\n    command.arg(\"clone\").arg(url).arg(checkout);\n    crate::git::sanitize_git_command(&mut command);\n    let status = command.status()?;\n    if !status.success() {\n        bail!(\"git clone failed with {status}\");\n    }\n    journal::note(format!(\"cloned {url} into {}\", checkout.display_user()));\n    Ok(true)\n}\n\nfn bootstrap_hooks_enabled() -> bool {\n    !(config::Settings::no_hooks()\n        || config::Settings::get().no_hooks.unwrap_or(false)\n        || config::Settings::get().safe)\n}\n\nasync fn run_bootstrap_hooks(\n    config: &Config,\n    hooks: &[hooks::BootstrapHook],\n    phase: BootstrapHookPhase,\n    dry_run: bool,\n) -> Result<()> {\n    if !bootstrap_hooks_enabled() {","sourceCodeStart":4191,"sourceCodeEnd":4227,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/bootstrap.rs#L4191-L4227","documentation":"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.","triggerScenarios":"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).","commonSituations":"Private repository without credentials; typo'd URL; corporate proxy blocking github.com; disk/permission problems in the checkout location.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"git ls-remote <url> || throw new Error('repo unreachable')","typeGuard":null,"tryCatchPattern":"try { await clone(url) } catch (e) { if (/git clone failed/.test(e.message)) await retryWithBackoff(clone, 3) }","preventionTips":["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"],"tags":["git","clone","network","bootstrap"],"backgroundTag":"git-command-failed","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}