{"record":{"id":"5048c2c53b96390a","repo":"jdx/mise","slug":"unsupported-forge-type","errorCode":null,"errorMessage":"Unsupported forge type {:?}","messagePattern":"Unsupported forge type (.+?)","errorType":"exception","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/backend/ubi.rs","lineNumber":63,"sourceCode":"\n    fn provider(&self) -> eyre::Result<ForgeType> {\n        match self.values.str(\"provider\") {\n            Some(forge) => Ok(ForgeType::from_str(forge)?),\n            None => Ok(ForgeType::default()),\n        }\n    }\n\n    fn api_url_override(&self) -> Option<&'a str> {\n        self.values.str(\"api_url\")\n    }\n\n    fn api_url(&self, forge: &ForgeType) -> eyre::Result<String> {\n        match self.api_url_override() {\n            Some(api_url) => Ok(api_url.strip_suffix('/').unwrap_or(api_url).to_string()),\n            None => match forge {\n                ForgeType::GitHub => Ok(github::API_URL.to_string()),\n                ForgeType::GitLab => Ok(gitlab::API_URL.to_string()),\n                _ => bail!(\"Unsupported forge type {:?}\", forge),\n            },\n        }\n    }\n\n    fn tag_regex(&self) -> Option<&'a str> {\n        self.values.str(\"tag_regex\")\n    }\n\n    fn bin_path(&self) -> Option<String> {\n        self.values.platform_string(\"bin_path\")\n    }\n\n    fn extract_all(&self) -> bool {\n        self.values.bool(\"extract_all\")\n    }\n\n    fn exe(&self) -> Option<&'a str> {\n        self.values.str(\"exe\")","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/backend/ubi.rs#L45-L81","documentation":"The ubi backend maps its `provider` option to the ubi crate's ForgeType. When computing the default API URL, only ForgeType::GitHub and ForgeType::GitLab have a known API endpoint; any other variant (e.g. `generic`) without an explicit `api_url` override makes api_url() bail with 'Unsupported forge type' (src/backend/ubi.rs:63).","triggerScenarios":"Setting `provider = \"generic\"` (or any non-github/gitlab ForgeType accepted by ForgeType::from_str) in a mise.toml ubi tool entry without also setting `api_url`. Triggers on the first operation that needs the API URL: install, ls-remote, or version listing.","commonSituations":"Trying to install from a forge other than GitHub/GitLab via ubi; copying an ubi CLI `--forge` value that mise's version-listing code does not support; setting provider to a string that parses to the generic variant.","solutions":["Set provider = \"github\" (the default) or provider = \"gitlab\" — these are the only forges with built-in API support here","If you are on an enterprise/self-hosted GitHub or GitLab, keep the provider and add api_url = \"https://gitlab.example.com/api/v4\" (or /api/v3) instead of switching provider","For non-GitHub/GitLab forges, use the http backend with an explicit url, or aqua/github backends"],"exampleFix":"# before (mise.toml)\n[tools.ubi]\nmytool = { repo = 'example/mytool', provider = 'generic' }\n\n# after\n[tools.ubi]\nmytool = { repo = 'example/mytool', provider = 'github' }","handlingStrategy":"validation","validationCode":"# Validate the provider option before install\nfn supported_provider(p: Option<&str>) -> bool {\n    matches!(p, None | Some(\"github\") | Some(\"gitlab\"))\n}\nassert!(supported_provider(None));\nassert!(!supported_provider(Some(\"generic\")));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Omit provider (defaults to github) unless you mean gitlab","Use api_url for enterprise endpoints rather than changing provider","For non-GitHub/GitLab sources, use the http backend with an explicit url"],"tags":["mise","ubi","forge","provider","config-validation"],"backgroundTag":"unsupported-provider","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}