{"record":{"id":"ff679bec1e00a24e","repo":"jdx/mise","slug":"incoming-history-origin-is-machine-local-configuration","errorCode":null,"errorMessage":"incoming history.origin is machine-local configuration; remove it from the shared setup and use `mise dot origin set` on this machine ({})","messagePattern":"incoming history\\.origin is machine-local configuration; remove it from the shared setup and use `mise dot origin set` on this machine \\((.+?)\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/sync/preflight.rs","lineNumber":62,"sourceCode":"        {\n            continue;\n        }\n        let Some((mode, oid)) = object else {\n            continue;\n        };\n        if mode != \"100644\" && mode != \"100755\" {\n            bail!(\n                \"incoming configuration must be a regular file: {}\",\n                path.display()\n            );\n        }\n        let body = String::from_utf8(repo.cat_object(oid)?)?;\n        let parsed = MiseToml::for_history_preflight(&body, path)?;\n        if parsed\n            .history_config()\n            .is_some_and(|history| history.origin.is_some())\n        {\n            bail!(\n                \"incoming history.origin is machine-local configuration; remove it from the shared setup and use `mise dot origin set` on this machine ({})\",\n                path.display()\n            );\n        }\n        incoming_files.insert(\n            path.clone(),\n            Arc::new(parsed) as Arc<dyn crate::config::config_file::ConfigFile>,\n        );\n    }\n    crate::system::files::validate_incoming_files(&incoming_files)?;\n    let global = match &*crate::env::MISE_GLOBAL_CONFIG_FILE {\n        Some(path) => vec![path.clone()].into_iter().collect(),\n        None => candidates,\n    };\n    let mut files = ConfigMap::new();\n    let mut excludes = vec![];\n    for path in crate::config::system_config_files()\n        .into_iter()","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/sync/preflight.rs#L44-L80","documentation":"Thrown in prospective preflight when an incoming shared configuration file declares a `[history]` section with an `origin` key. history.origin is machine-local (it points at where history is stored on this machine), so it must never be distributed via the shared setup; mise blocks the whole batch to prevent one machine's local path being applied to others.","triggerScenarios":"A checked-in config file (e.g. the shared mise.toml) contains `[history]` with `origin = \"...\"`; prospective() parses the incoming file via MiseToml::for_history_preflight and detects the key.","commonSituations":"A user set history.origin in their local config and then committed the whole file to the shared repo; copy-pasting a personal config into the shared setup.","solutions":["Remove the `origin` key (or the whole `[history]` section) from the shared file and commit the fix","Keep history.origin in a machine-local, non-shared config file instead","On the affected machine run `mise dot origin set` to configure origin locally","Pull again after the shared setup is corrected"],"exampleFix":"# before (shared mise.toml)\n[history]\norigin = \"/home/alice/.local/share/mise/history\"\n# after\n# remove the [history] section; run `mise dot origin set` locally instead","handlingStrategy":"validation","validationCode":"grep -n '^origin' shared/mise.toml && echo \"remove machine-local history.origin from the shared file\" || echo ok","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep machine-local settings like history.origin in a non-shared, gitignored config","Run `mise dot origin set` locally instead of writing origin into shared files","Add a pre-commit check that rejects `[history] origin` in shared config files"],"tags":["history-sync","config","preflight"],"backgroundTag":"invalid-config-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"}