{"record":{"id":"9852d89abac2dda0","repo":"jdx/mise","slug":"self-update-repository-must-be-in-owner-repository","errorCode":null,"errorMessage":"self_update.repository must be in owner/repository format, got {:?}","messagePattern":"self_update\\.repository must be in owner/repository format, got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/version.rs","lineNumber":73,"sourceCode":"    }\n\n    fn cache_path(&self) -> std::path::PathBuf {\n        if self.is_default() {\n            dirs::CACHE.join(\"latest-version\")\n        } else {\n            dirs::CACHE.join(format!(\"latest-version-{}\", crate::hash::hash_to_str(self)))\n        }\n    }\n\n    #[cfg(feature = \"self_update\")]\n    pub(crate) fn repository_parts(&self) -> Result<(&str, &str)> {\n        let (owner, repo) = self.repository.split_once('/').ok_or_else(|| {\n            eyre::eyre!(\n                \"self_update.repository must be in owner/repository format, got {:?}\",\n                self.repository\n            )\n        })?;\n        eyre::ensure!(\n            !owner.is_empty() && !repo.is_empty() && !repo.contains('/'),\n            \"self_update.repository must be in owner/repository format, got {:?}\",\n            self.repository\n        );\n        Ok((owner, repo))\n    }\n\n    pub(crate) fn validate(&self) -> Result<()> {\n        let api_url = url::Url::parse(&self.api_url)?;\n        eyre::ensure!(\n            api_url.scheme() == \"https\",\n            \"self_update.api_url must use HTTPS, got {:?}\",\n            self.api_url\n        );\n        Ok(())\n    }\n}\n","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/version.rs#L55-L91","documentation":"The self-update configuration's `repository` field must be a plain `owner/repository` slug. `repository_parts` splits on a single '/' and validation additionally rejects empty owner/repo or extra slashes. This prevents constructing invalid GitHub API URLs during self-update.","triggerScenarios":"Setting the self_update.repository config (env/setting) to a value without a '/', with empty segments, or with nested paths like 'owner/org/repo'.","commonSituations":"Pasting a full GitHub URL instead of the slug, typos like '/owner/repo' or 'owner/', or pointing at a fork path with extra segments.","solutions":["Set self_update.repository to the `owner/repo` form, e.g. `jdx/mise`","Remove any `https://github.com/` prefix or `.git` suffix from the value","Check for leading/trailing slashes or double slashes in the setting","Verify with the setting source (mise.toml, env var) that only the slug is configured"],"exampleFix":"// before\nself_update.repository = \"https://github.com/jdx/mise.git\"\n// after\nself_update.repository = \"jdx/mise\"","handlingStrategy":"validation","validationCode":"const repo = self_update_repository;\nif (!/^[^/]+\\/[^/]+$/.test(repo)) throw new Error(`repository must be owner/repo, got ${repo}`);","typeGuard":null,"tryCatchPattern":"try {\n  update_self()\n} catch (e) {\n  if (String(e).includes(\"owner/repository format\")) {\n    console.error(\"Fix self_update.repository to 'owner/repo', not a full URL\");\n  } else throw e;\n}","preventionTips":["Always configure the bare slug (owner/repo), never a full GitHub URL","Strip .git and URL prefixes when copying from a browser address bar","Document expected format next to the setting in your dotfiles","Test self-update config with a dry check before relying on it"],"tags":["self-update","config","github","validation"],"backgroundTag":"invalid-argument-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"}