jdx/mise · error
has origin , expected
Error message
{} has origin {origin:?}, expected {url:?} What it means
validate_bootstrap_checkout read remote.origin.url from an existing bootstrap checkout and got a URL different from the requested one. The directory is a clone of a different repository, so mise refuses to reuse it to avoid mixing unrelated histories.
Solutions
- Update the checkout's origin to match: `git remote set-url origin <url>`.
- Or run bootstrap with the URL the checkout actually uses (check `git remote get-url origin`).
- Or remove the checkout and re-clone from the desired URL.
Example fix
// before mise bootstrap --from https://github.com/me/dotfiles.git # origin is git@github.com:me/dotfiles.git // after git remote set-url origin https://github.com/me/dotfiles.git
Defensive patterns
Strategy: validation
Validate before calling
[ "$(git -C "$DIR" remote get-url origin)" = "$URL" ] || echo "origin mismatch with $URL"
Prevention
- Pass the exact origin URL (same scheme/host, .git suffix as configured).
- Normalize URLs (http vs ssh) before comparing or scripting.
- Check `git remote get-url origin` when switching repos.
When it happens
Trigger: Running `mise bootstrap --from <url>` against an existing checkout whose remote.origin.url differs (different host, http vs ssh, .git suffix, different repo).
Common situations: Switching dotfile repos; using an HTTPS URL while the checkout was cloned via SSH (or vice versa).
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- exists but is not a git checkout with an origin remote
- git clone failed with
- git command failed with
- must set a non-empty `url`
- must set `url`
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/4e0240ceb38127bd.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/bootstrap.rs:219
}
fn validate_bootstrap_checkout(checkout: &Path, url: &str) -> Result<()> {
let mut command = Command::new("git");
command
.arg("-C")
.arg(checkout)
.args(["config", "--get", "remote.origin.url"]);
crate::git::sanitize_git_command(&mut command);
let output = command.output()?;
if !output.status.success() {
bail!(
"{} exists but is not a git checkout with an origin remote",
checkout.display_user()
);
}
let origin = String::from_utf8(output.stdout)?.trim().to_string();
if origin != url {
bail!(
"{} has origin {origin:?}, expected {url:?}",
checkout.display_user()
);
}
Ok(())
}
fn bootstrap_resource_is_skipped(resource: &ResourceId, skip: &HashSet<BootstrapPart>) -> bool {
let part = match resource.kind.as_str() {
"package" => BootstrapPart::Packages,
"file" | "directory" => BootstrapPart::Files,
"service" => BootstrapPart::Services,
"firewall" | "firewall-rule" => BootstrapPart::Firewall,
"user" | "group" => BootstrapPart::Accounts,
_ => return false,
};
skip.contains(&part)
}View on GitHub (pinned to 533346cc37)