{"record":{"id":"66e3765bff213e50","repo":"jdx/mise","slug":"remote-cache-url-must-use-https","errorCode":null,"errorMessage":"remote cache URL must use HTTPS","messagePattern":"remote cache URL must use HTTPS","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/mise-cache-core/src/lib.rs","lineNumber":1112,"sourceCode":"        || url.scheme() == \"http\"\n            && url.host().is_some_and(|host| match host {\n                Host::Domain(host) => host.eq_ignore_ascii_case(\"localhost\"),\n                Host::Ipv4(address) => address.is_loopback(),\n                Host::Ipv6(address) => address.is_loopback(),\n            })\n    {\n        Ok(())\n    } else {\n        bail!(\"GitHub Actions OIDC request URL must use HTTPS\")\n    }\n}\n\nfn validate_remote_url(base_url: &Url, authenticated: bool) -> Result<()> {\n    if base_url.scheme() == \"https\" {\n        return Ok(());\n    }\n    if base_url.scheme() != \"http\" {\n        bail!(\"remote cache URL must use HTTPS\");\n    }\n    let is_loopback = base_url.host().is_some_and(|host| match host {\n        Host::Domain(host) => host.eq_ignore_ascii_case(\"localhost\"),\n        Host::Ipv4(address) => address.is_loopback(),\n        Host::Ipv6(address) => address.is_loopback(),\n    });\n    if !is_loopback && authenticated {\n        bail!(\"remote cache URL must use HTTPS except for loopback development servers\");\n    }\n    if !is_loopback {\n        warn!(\n            \"using an unauthenticated remote build cache over plain HTTP; cache traffic can be read \\\n             or modified in transit\"\n        );\n    }\n    Ok(())\n}\n","sourceCodeStart":1094,"sourceCodeEnd":1130,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/crates/mise-cache-core/src/lib.rs#L1094-L1130","documentation":"validate_remote_url rejects cache base URLs that are neither HTTPS nor plain HTTP. Any other scheme (ftp:, file:, ws:, etc.) cannot be used for the remote cache and produces this error before any request is made.","triggerScenarios":"Calling validate_remote_url with a Url whose scheme is not \"https\" and not \"http\" — for example ftp://cache.example.com, file:///cache, or a scheme-less value parsed into an unexpected scheme.","commonSituations":"Typo in the cache URL scheme in mise.toml or environment config, pasting a local filesystem path where a URL is expected, using a ws:// endpoint from another tool's config.","solutions":["Set the cache URL to https://cache.example.com","For local development, http://localhost:<port> is permitted","Remove an accidental file:// or ftp:// prefix and use a proper HTTP(S) cache server","Check the config key you set — you may have put the cache dir path into the URL field"],"exampleFix":"// before (config)\nMISE_CACHE_REMOTE_URL=ftp://cache.example.com\n// after\nMISE_CACHE_REMOTE_URL=https://cache.example.com","handlingStrategy":"validation","validationCode":"let url = Url::parse(cache_url)?;\nassert!(matches!(url.scheme(), \"https\" | \"http\"), \"cache URL must be http(s)\");","typeGuard":"fn is_http_scheme(url: &Url) -> bool {\n    matches!(url.scheme(), \"https\" | \"http\")\n}","tryCatchPattern":"match validate_remote_url(&url, authenticated) {\n    Err(e) if e.to_string().contains(\"must use HTTPS\") => {\n        eprintln!(\"fix the scheme of MISE_CACHE_REMOTE_URL\");\n    }\n    other => other,\n}","preventionTips":["Store cache URLs in config with the scheme included","Lint config values for scheme typos before deployment","Never paste filesystem paths into URL fields"],"tags":["remote-cache","url","config"],"backgroundTag":"invalid-url-format","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"}