jdx/mise · error
must set `url`
Error message
must set `url`
What it means
Every `[bootstrap.repos]` entry must carry a `url` — the git remote mise clones from and compares the existing origin against. from_toml bails with `must set url` when the url key is entirely absent from the entry's table (a distinct case from an empty or dash-prefixed url).
Source
Thrown at src/system/repos.rs:124
.any(|component| matches!(component, Component::Normal(_)))
{
bail!(
"relative repo path `{path_raw}` must name a directory inside the project root"
);
}
// Join only the Normal segments so `./foobar` resolves to
// `<root>/foobar` rather than `<root>/./foobar` — a `.` component
// survives `Path::join` and leaks into every displayed path.
let mut resolved = root.to_path_buf();
for component in path.components() {
if let Component::Normal(segment) = component {
resolved.push(segment);
}
}
resolved
};
let Some(url) = config.url.map(|s| s.trim().to_string()) else {
bail!("must set `url`");
};
if url.is_empty() {
bail!("must set a non-empty `url`");
}
if url.starts_with('-') {
bail!("`url` must not start with `-`");
}
let git_ref = config.git_ref.map(|s| s.trim().to_string());
let git_ref = match git_ref {
Some(git_ref) if git_ref.is_empty() => bail!("`ref` must not be empty"),
Some(git_ref) if git_ref.starts_with('-') => bail!("`ref` must not start with `-`"),
other => other,
};
Ok(Self {
path_raw,
path,
url,
git_ref,View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Add `url = "https://github.com/owner/repo.git"` (or an ssh form) to the entry
- Remove the entry if you manage that clone by hand
Example fix
# before
[bootstrap.repos]
"~/src/x" = { ref = "main" }
# after
[bootstrap.repos]
"~/src/x" = { url = "https://github.com/owner/repo.git", ref = "main" } Defensive patterns
Strategy: validation
Validate before calling
fn repo_entry_is_complete(cfg: &RepoTomlConfig) -> bool {
cfg.url.as_deref().is_some()
} Type guard
fn repo_entry_has_url(cfg: &RepoTomlConfig) -> bool {
cfg.url.as_deref().is_some()
} Prevention
- Every `[bootstrap.repos]` entry needs `url`; `ref` is the only optional field
- Validate mise.toml with `mise config` / a dry-run bootstrap before committing
When it happens
Trigger: `[bootstrap.repos."~/src/x"]` with only `ref = "main"`, or `"~/src/x" = { }` — no url key at all.
Common situations: Expecting mise to update an existing clone without configuring its remote; config generators or templating that drop the url field; entries added as documentation.
Related errors
- firewall rule '{name}' sets port without protocol
- relative repo paths are only allowed in a project config; us
- relative repo path `{path_raw}` must name a directory inside
- must set a non-empty `url`
- `ref` must not be empty
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/b357a81916617694.
Report an issue: GitHub.