jdx/mise · error

no setup repository is connected; `mise dot origin set

Error message

no setup repository is connected; `mise dot origin set <url>` connects one

What it means

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.

Solutions

  1. Connect a repository with `mise dot origin set <url>` (add `--branch <name>` if the branch is not the default).
  2. If it was disconnected intentionally, re-run `mise dot origin set <url>` to reconnect before syncing.
  3. Verify the saved status with the appropriate `mise dot origin` status/show command to confirm URL and branch are set.

Example fix

// before: sync without an origin
mise dot sync // error: no setup repository is connected
// after
mise dot origin set git@example.com:me/dotfiles.git
mise dot sync
Defensive patterns

Strategy: validation

Validate before calling

// check origin is configured before syncing
if origin_url.is_none() || origin_branch.is_none() || disconnected {
    eprintln!("connect first: mise dot origin set <url>");
    return;
}

Type guard

fn origin_configured(status: &Status) -> bool {
    status.origin_url.is_some() && status.origin_branch.is_some() && !status.disconnected
}

Try / catch

match sync() {
    Err(e) if e.to_string().contains("no setup repository is connected") => eprintln!("run: mise dot origin set <url>"),
    other => other,
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/4b25af4f6a5ac643. Report an issue: GitHub.

Appendix: source

Thrown at src/system/history/sync/run.rs:227

            dry_run: false,
        }
    }
}

/// The connected origin, or why there is none.
pub(crate) fn origin() -> Result<OriginTomlConfig> {
    if let Some((_, origin)) = crate::system::history::config::origin()? {
        return Ok(origin);
    }
    // recorded when it was connected: a fresh machine's declaration may
    // still be on its way in the configuration being pulled
    let status = read_status(&crate::dirs::STATE)?;
    if let (Some(url), Some(branch), false) =
        (status.origin_url, status.origin_branch, status.disconnected)
    {
        return Ok(OriginTomlConfig::plain(url, branch));
    }
    bail!("no setup repository is connected; `mise dot origin set <url>` connects one")
}

/// Runs one synchronization.
pub(crate) fn sync(
    store: &Store,
    tracked: &TrackedSet,
    request: &SyncRequest,
) -> Result<SyncOutcome> {
    let _sync_lock = lock(store)?;
    sync_locked(store, tracked, request)
}

/// Runs one synchronization while the caller holds the sync lock.
pub(crate) fn sync_locked(
    store: &Store,
    tracked: &TrackedSet,
    request: &SyncRequest,
) -> Result<SyncOutcome> {

View on GitHub (pinned to 533346cc37)