jdx/mise · error
brew-cask: unsupported tap URL for '{name}'; only GitHub tap
Error message
brew-cask: unsupported tap URL for '{name}'; only GitHub tap URLs can be fetched directly What it means
The cask twin of the formula tap error: to fetch a third-party cask's JSON without the brew CLI, mise derives a raw.githubusercontent.com base from the tap (tap_raw_base). When a tap URL is configured but isn't a plain https://github.com/<owner>/<repo> URL, no base can be derived and mise refuses rather than guessing.
Source
Thrown at src/system/packages/brew/cask.rs:848
}
}
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 9dcfcaa0dc)
Solutions
- Point the tap at its bare GitHub repo URL: https://github.com/<owner>/<repo>
- Drop the URL override — the owner/homebrew-<tap> convention is inferred automatically
- For non-GitHub taps, install the cask with the brew CLI outside mise
Example fix
# before [bootstrap.brew.taps] "myorg/casks" = "git@github.com:myorg/homebrew-casks.git" # after [bootstrap.brew.taps] "myorg/casks" = "https://github.com/myorg/homebrew-casks"
Defensive patterns
Strategy: validation
Validate before calling
fn is_bare_github_url(url: &str) -> bool {
let u = url.trim_end_matches(".git").trim_end_matches('/');
match u.strip_prefix("https://github.com/") {
Some(rest) => rest.split('/').count() == 2,
None => false,
}
}
// validate req.tap_url before fetching a tapped cask Try / catch
Catch the 'unsupported tap URL' bail and report the configured tap entry: only bare GitHub https URLs are supported for direct cask metadata fetching.
Prevention
- Keep [bootstrap.brew.taps] entries as bare GitHub repo URLs
- Test third-party taps with a single mise install before wiring them into bootstrap
When it happens
Trigger: Requesting `brew-cask:owner/tap/token` while the configured tap URL (in [bootstrap.brew.taps]) is non-GitHub (GitLab, self-hosted), an SSH URL, or contains extra path components such as /tree/main.
Common situations: Internal GitLab mirrors of taps; copy-pasted clone URLs; taps hosted outside GitHub entirely.
Related errors
- brew: tapped formula '{name}' needs a GitHub tap URL in [boo
- brew casks are installed at their current version ('{p}')
- brew-cask:{}: dependency cycle detected
- brew-cask:{}: Homebrew owns this cask; remove it with Homebr
- brew-cask:{}: conflicts with installed cask {}
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/e69b162a137f926a.
Report an issue: GitHub.