{"record":{"id":"5048c2c53b96390a","repo":"jdx/mise","slug":"unsupported-forge-type","errorCode":null,"errorMessage":"Unsupported forge type {:?}","messagePattern":"Unsupported forge type (.+?)","errorType":"exception","errorClass":null,"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/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/ubi.rs#L45-L81","documentation":"The ubi backend only supports GitHub and GitLab forges when deriving the API URL. If api_url_override is unset and the forge type is anything else, api_url bails with 'Unsupported forge type'. ubi is deprecated in mise and only these two forges are wired up.","triggerScenarios":"Resolving the API URL for a ubi-based tool whose configuration (or ubi defaults) yields a ForgeType other than GitHub or GitLab, with no api_url override set.","commonSituations":"Misconfigured ubi tool entries pointing at unsupported forges (e.g. Forgejo, SourceHut); internal registry assumptions that ubi cannot serve.","solutions":["Set an explicit api_url override in the tool config if the forge exposes a compatible API","Switch the tool entry to a github:/ or gitlab:/ backend instead of ubi","Check that the platform/forge configuration for the ubi tool is one of GitHub or GitLab"],"exampleFix":"# before (ubi tool config with unsupported forge)\n[tools]\nmytool = { source = \"ubi\", forge = \"forgejo\" }\n# after\n[tools]\nmytool = \"github:owner/mytool\"","handlingStrategy":"fallback","validationCode":"# pre-check forge support\nSUPPORTED = {'github', 'gitlab'}\nassert forge in SUPPORTED or config.get('api_url'), 'ubi: set api_url or use a supported forge'","typeGuard":"fn forge_is_github_or_gitlab(f: &ForgeType) -> bool {\n    matches!(f, ForgeType::GitHub | ForgeType::GitLab)\n}","tryCatchPattern":"match api_url_result {\n    Err(e) if e.to_string().contains(\"Unsupported forge type\") =>\n        switch_to_github_or_gitlab_backend(),\n    r => r,\n}","preventionTips":["Use github:/gitlab:/aqua: backends instead of deprecated ubi","Set api_url for self-hosted forges","Validate forge config at parse time"],"tags":["ubi","forge","unsupported"],"backgroundTag":"unsupported-enum-value","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}