{"record":{"id":"b45686721bcce0c6","repo":"jdx/mise","slug":"cannot-onboard-this-setup-repository-history-is-u","errorCode":null,"errorMessage":"cannot onboard this setup repository: history is unavailable: {reason}","messagePattern":"cannot onboard this setup repository: history is unavailable: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/sync/onboard.rs","lineNumber":158,"sourceCode":"    // Detect marked repositories without creating persistent tracking state\n    // for users of the released, ordinary --adopt workflow.\n    let probe_dir = tempfile::tempdir()?;\n    let store = Store::open_in(probe_dir.path())?;\n    if let Some(reason) = store.unavailable() {\n        bail!(\"cannot determine whether {url} is a setup repository: {reason}\");\n    }\n    let repo = store\n        .repo()\n        .ok_or_else(|| eyre::eyre!(\"probing a setup repository requires git\"))?;\n    let Some(branch) = default_branch(&Remote::new(repo, url))? else {\n        return Ok(None);\n    };\n    if !matches!(probe(&store, url, &branch)?, RepoState::Marked(_)) {\n        return Ok(None);\n    }\n    let store = Store::open()?;\n    if let Some(reason) = store.unavailable() {\n        bail!(\"cannot onboard this setup repository: history is unavailable: {reason}\");\n    }\n    refuse_other_connection(&store, url, &branch)?;\n    let outcome = run(\n        &store,\n        &Onboarding {\n            fetch_from: url.to_string(),\n            origin: url.to_string(),\n            branch,\n            yes,\n            dry_run,\n        },\n    )\n    .await?;\n    Ok(Some(outcome))\n}\n\n/// The branch a fresh machine takes: the repository's default branch (its\n/// `HEAD`), else `main`, else `master`, else the first head; `None` when the","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/history/sync/onboard.rs#L140-L176","documentation":"Precondition bail in onboard from_git(): the store reports itself unavailable (Store::unavailable returned a reason, e.g. git missing or store initialization failed), so mise cannot probe whether the given URL is a setup repository. The message surfaces the underlying unavailability reason.","triggerScenarios":"Thrown at src/system/history/sync/onboard.rs:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Resolve the reported underlying reason (install git, fix store permissions/state dir)","Verify `git` works on PATH before re-running bootstrap onboarding","Retry onboarding once the history store can open successfully"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}