jdx/mise · error
remote bootstrap requires HTTPS, SSH, or a local path
Error message
remote bootstrap requires HTTPS, SSH, or a local path
What it means
During remote-repository onboarding, mise validates the git remote origin string. If the origin has a URL scheme (contains '://') that is not https, ssh, or file, onboarding is rejected. Git remote helpers and exotic transports are not supported for bootstrap.
Source
Thrown at src/system/remote_repository.rs:62
pub(crate) fn validate_origin(origin: &str) -> Result<()> {
if origin.starts_with('-') || origin.chars().any(char::is_control) {
bail!("invalid repository origin");
}
// Explicit local paths may contain colons; otherwise :: selects a Git helper.
let explicit_local = std::path::Path::new(origin).is_absolute()
|| origin.starts_with("./")
|| origin.starts_with("../");
if !explicit_local
&& origin.split_once("::").is_some_and(|(prefix, _)| {
!prefix.is_empty() && !prefix.contains(['/', '\\', '[', ']', '@', ':'])
})
{
bail!("Git remote helpers are not supported for remote onboarding");
}
if !explicit_local && origin.contains("://") {
let url = url::Url::parse(origin).wrap_err("invalid repository URL")?;
if !matches!(url.scheme(), "https" | "ssh" | "file") {
bail!("remote bootstrap requires HTTPS, SSH, or a local path");
}
}
if let Ok(url) = url::Url::parse(origin)
&& (url.password().is_some()
|| (url.scheme() != "ssh" && !url.username().is_empty())
|| url.query().is_some()
|| url.fragment().is_some())
{
bail!("repository origin must not contain credentials, query parameters, or fragments");
}
Ok(())
}
impl Source {
pub(crate) async fn fetch(origin: String) -> Result<Self> {
validate_origin(&origin)?;
let directory = tempfile::tempdir()?;
let repo = directory.path().join("repo");View on GitHub (pinned to afd2eddd3a)
Solutions
- Change the origin to an https:// URL, e.g. https://github.com/owner/repo.git
- Use an SSH URL ssh://git@github.com/owner/repo.git or a local file:// path
- Remove any remote-helper prefix (ext::, gitremote-helpers forms) from the origin
Example fix
// before let origin = "git://github.com/owner/repo.git"; // after let origin = "https://github.com/owner/repo.git";
Defensive patterns
Strategy: validation
Validate before calling
fn origin_scheme_ok(origin: &str) -> bool {
match origin.split_once("://") {
Some((scheme, _)) => matches!(scheme, "https" | "ssh" | "file"),
None => true, // no scheme (e.g. git@host:path) is allowed
}
} Type guard
fn is_supported_origin(origin: &str) -> bool {
origin.contains("://")
&& matches!(origin.split('://').next(), Some("https") | Some("ssh") | Some("file"))
|| !origin.contains("://")
} Prevention
- Always use https:// or ssh:// URLs for onboarding origins
- Never use git:// or remote-helper transports
- Test the origin with `git ls-remote` before calling the API
When it happens
Trigger: Calling Source::fetch or install_at with an origin like git://host/repo, ftp://..., or a remote-helper form (e.g. git@... without a scheme is fine, but ext:: or helper schemes are not).
Common situations: Copying a git:// URL from old project docs, using a custom git remote-helper transport, or pasting an scp-like URL that got mangled into an unsupported scheme.
Understand the failure class
Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.
Related errors
- setup repository URL must be nonempty and must not start wit
- invalid HTTP setup repository URL; use a Git credential help
- {} exists but is not a git checkout with an origin remote
- invalid relay path encoding
- invalid relay path
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/416ea8c5f61307a0.
Report an issue: GitHub.