{"record":{"id":"4b25af4f6a5ac643","repo":"jdx/mise","slug":"no-setup-repository-is-connected-mise-dot-origin-set-url","errorCode":null,"errorMessage":"no setup repository is connected; `mise dot origin set <url>` connects one","messagePattern":"no setup repository is connected; `mise dot origin set <url>` connects one","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/sync/run.rs","lineNumber":227,"sourceCode":"            dry_run: false,\n        }\n    }\n}\n\n/// The connected origin, or why there is none.\npub(crate) fn origin() -> Result<OriginTomlConfig> {\n    if let Some((_, origin)) = crate::system::history::config::origin()? {\n        return Ok(origin);\n    }\n    // recorded when it was connected: a fresh machine's declaration may\n    // still be on its way in the configuration being pulled\n    let status = read_status(&crate::dirs::STATE)?;\n    if let (Some(url), Some(branch), false) =\n        (status.origin_url, status.origin_branch, status.disconnected)\n    {\n        return Ok(OriginTomlConfig::plain(url, branch));\n    }\n    bail!(\"no setup repository is connected; `mise dot origin set <url>` connects one\")\n}\n\n/// Runs one synchronization.\npub(crate) fn sync(\n    store: &Store,\n    tracked: &TrackedSet,\n    request: &SyncRequest,\n) -> Result<SyncOutcome> {\n    let _sync_lock = lock(store)?;\n    sync_locked(store, tracked, request)\n}\n\n/// Runs one synchronization while the caller holds the sync lock.\npub(crate) fn sync_locked(\n    store: &Store,\n    tracked: &TrackedSet,\n    request: &SyncRequest,\n) -> Result<SyncOutcome> {","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/sync/run.rs#L209-L245","documentation":"Sync requires a configured origin (URL and branch) stored in the sync status. When no origin URL/branch is recorded — or the origin is marked disconnected — mise cannot fetch or publish and tells the user how to connect a setup repository.","triggerScenarios":"Running `mise dot sync` (or any origin-consuming command) before ever calling `mise dot origin set <url>`, or after `mise dot origin disconnect` set status.disconnected = true.","commonSituations":"Fresh machine or fresh state directory where sync was never configured; user disconnected the origin intentionally and forgot to reconnect; state file wiped while the repository still exists.","solutions":["Connect a repository with `mise dot origin set <url>` (add `--branch <name>` if the branch is not the default).","If it was disconnected intentionally, re-run `mise dot origin set <url>` to reconnect before syncing.","Verify the saved status with the appropriate `mise dot origin` status/show command to confirm URL and branch are set."],"exampleFix":"// before: sync without an origin\nmise dot sync // error: no setup repository is connected\n// after\nmise dot origin set git@example.com:me/dotfiles.git\nmise dot sync","handlingStrategy":"validation","validationCode":"// check origin is configured before syncing\nif origin_url.is_none() || origin_branch.is_none() || disconnected {\n    eprintln!(\"connect first: mise dot origin set <url>\");\n    return;\n}","typeGuard":"fn origin_configured(status: &Status) -> bool {\n    status.origin_url.is_some() && status.origin_branch.is_some() && !status.disconnected\n}","tryCatchPattern":"match sync() {\n    Err(e) if e.to_string().contains(\"no setup repository is connected\") => eprintln!(\"run: mise dot origin set <url>\"),\n    other => other,\n}","preventionTips":["Run `mise dot origin set <url>` on every new machine before first sync.","Remember to re-set the origin after `mise dot origin disconnect`.","Scripted setups should assert origin is configured before invoking sync."],"tags":["sync","configuration","missing-config","git"],"backgroundTag":"missing-config-value","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"}