jdx/mise · error
brew-cask: unsupported tap URL for
Error message
brew-cask: unsupported tap URL for '{name}'; only GitHub tap URLs can be fetched directly What it means
fetch_cask (src/system/packages/brew/cask.rs:913) resolves a tapped cask request (owner/tap/token) to the tap's raw GitHub metadata URL. super::api::tap_raw_base only builds a base when the tap URL configured in [bootstrap.brew.taps] passes github_raw_base (api.rs:231) — a plain https://github.com/owner/repo shape with no extra path segments; any other URL yields None and mise refuses, because only GitHub raw URLs are fetched directly.
Solutions
- Set the tap to a plain GitHub web URL in [bootstrap.brew.taps], e.g. owner/tap = https://github.com/owner/homebrew-tap
- Convert SSH URLs to https and strip .git suffixes and subpaths so only owner/repo remains
- Taps outside GitHub cannot be served by this direct-fetch design — install such casks via the Homebrew CLI instead
Example fix
# before (mise.toml) [bootstrap.brew.taps] "acme/casks" = "git@github.com:acme/homebrew-casks.git" # after [bootstrap.brew.taps] "acme/casks" = "https://github.com/acme/homebrew-casks"
Defensive patterns
Strategy: validation
Validate before calling
fn tap_url_is_github(url: &str) -> bool {
let rest = url.trim_end_matches(".git").trim_end_matches('/');
match rest.strip_prefix("https://github.com/") {
Some(r) => !r.is_empty() && r.split('/').count() == 2,
None => false,
}
} Prevention
- Accept only plain https://github.com/owner/repo URLs in tap configuration
- Normalize pasted URLs (drop /tree/main, .git, SSH forms) at config-write time
- Track that mise's brew integration fetches GitHub raw directly — non-GitHub taps need the brew CLI
When it happens
Trigger: Requesting owner/tap/cask-name while the [bootstrap.brew.taps] entry for that tap is a GitLab/Gitea/self-hosted URL, an SSH URL (git@github.com:owner/repo.git), or a GitHub URL with subpaths like /tree/main — every case github_raw_base rejects.
Common situations: GitHub Enterprise or other mirrored hosts recorded as tap URLs; users pasting clone or page URLs including subdirectories; SSH URLs copied from the GitHub Code dropdown.
Related errors
- aqua package does not have repo_owner and/or repo_name.
- brew-cask: ' ' must be an absolute path
- brew-cask: ' ' must not contain '..
- brew-cask: ' ' must not resolve to the filesystem root
- brew-cask: app target contains NUL
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/e69b162a137f926a.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/packages/brew/cask.rs:913
}
}
async fn fetch_cask(req: &PackageRequest) -> Result<Cask> {
let name = &req.name;
let (requested_token, official_api) = match split_tap_name(name) {
Some(("homebrew", "cask", token)) => (token, true),
Some((_, _, token)) => (token, false),
None => (name.as_str(), true),
};
validate_cask_path_component("requested token", requested_token)?;
let (url, raw_base) = match split_tap_name(name) {
Some(("homebrew", "cask", token)) => (
format!("{API_BASE}/cask/{token}.json"),
Some(HOMEBREW_CASK_RAW.to_string()),
),
Some((owner, tap, token)) => {
let Some(base) = super::api::tap_raw_base(owner, tap, req.tap_url.as_deref()) else {
bail!(
"brew-cask: unsupported tap URL for '{name}'; only GitHub tap URLs can be fetched directly"
);
};
(
format!("{base}/api/cask/{token}.json"),
Some(base.trim_end_matches("/HEAD").to_string()),
)
}
None => (
format!("{API_BASE}/cask/{name}.json"),
Some(HOMEBREW_CASK_RAW.to_string()),
),
};
let mut cask = HTTP_FETCH
.json_cached::<Cask, _>(url)
.await
.wrap_err_with(|| {
format!(View on GitHub (pinned to 6f52dcdf99)