jdx/mise · error
{} has origin {origin:?}, expected {url:?}
Error message
{} has origin {origin:?}, expected {url:?} What it means
During bootstrap validation, the existing checkout's `origin` remote URL does not match the URL mise expects for this bootstrap source, so mise refuses to use it. The error shows both the found and expected URLs.
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 afd2eddd3a)
Solutions
- Set the origin to the expected URL: `git -C <path> remote set-url origin <expected-url>`.
- Or delete the checkout and let mise re-clone from the expected URL.
- Match the URL form exactly (protocol, `.git` suffix) as printed in the error message.
Example fix
// before # origin: git@github.com:jdx/mise.git (expected https://github.com/jdx/mise.git) git -C ~/.local/share/mise/bootstrap/mise remote set-url origin https://github.com/jdx/mise.git // after # origin now matches; re-run the mise command
Defensive patterns
Strategy: validation
Validate before calling
origin=$(git -C <path> config --get remote.origin.url 2>/dev/null); [ "$origin" = "<expected-url>" ] || echo "origin mismatch: $origin"
Prevention
- Clone bootstrap repos with the exact URL form mise expects (same protocol and .git suffix).
- Avoid repointing origin of mise-managed checkouts to forks.
- When upstream repos move, delete the stale checkout so mise re-clones the new URL.
When it happens
Trigger: `validate_bootstrap_checkout` compares `git config --get remote.origin.url` output against the expected bootstrap URL and they differ (exact string comparison, so even trailing `.git` vs no `.git` or https-vs-ssh mismatches trigger it).
Common situations: Cloning via SSH (`git@github.com:org/repo.git`) when mise expects HTTPS (or vice versa), forks pointed at a different remote, or the upstream repository being renamed/moved.
Understand the failure class
Background: "git command failed": what it means when a tool shells out to git and git exits non-zero — this error's family across 21 libraries.
Related errors
- {} exists but is not a git checkout with an origin remote
- git command failed with {status}
- no remote targets configured; pass --host [user@]host or add
- select a remote target by name, --tag, or --all (configured:
- remote bootstrap configuration is invalid for {} target(s):
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/4e0240ceb38127bd.
Report an issue: GitHub.