{"record":{"id":"e0fbfefb1489da2c","repo":"jdx/mise","slug":"packslip-stampers-entry-spec-host-is-not","errorCode":null,"errorMessage":"packslip.stampers entry {spec:?}: {host:?} is not a host name","messagePattern":"packslip\\.stampers entry (.+?): (.+?) is not a host name","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/packslip_stamps.rs","lineNumber":56,"sourceCode":"    pub(crate) host: String,\n    pin: Pin,\n}\n\nimpl Stamper {\n    /// `host=PIN`, where PIN is a minisign public key line, the path of a\n    /// `.pub` file, or an `https://` identity prefix for a keyless signer\n    /// on GitHub such as `https://github.com/org/registry/`.\n    pub(crate) fn parse(spec: &str) -> Result<Stamper> {\n        let spec = spec.trim();\n        let Some((host, pin)) = spec.split_once('=') else {\n            bail!(\n                \"packslip.stampers entry {spec:?} has no pin; write host=PUBKEY, host=path/to/key.pub, or host=https://github.com/org/repo/\"\n            );\n        };\n        let host = host.trim();\n        let pin = pin.trim();\n        if host.is_empty() || !host.contains('.') || host.contains('/') {\n            bail!(\"packslip.stampers entry {spec:?}: {host:?} is not a host name\");\n        }\n        let pin = if pin.starts_with(\"https://\") {\n            Pin::Identity(Policy {\n                issuer: Some(GITHUB_ISSUER.into()),\n                identity: None,\n                identity_prefix: Some(pin.to_string()),\n            })\n        } else {\n            let text = if std::path::Path::new(pin).is_file() {\n                file::read_to_string(pin)?\n            } else {\n                pin.to_string()\n            };\n            let key = packslip::minisign::PublicKey::parse(&text)\n                .map_err(|e| eyre!(\"packslip.stampers entry for {host}: pubkey: {e}\"))?;\n            Pin::Key(key)\n        };\n        Ok(Stamper {","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/packslip_stamps.rs#L38-L74","documentation":"In a packslip.stampers entry host=PIN, the host part must look like a real host name: non-empty, containing a dot, and containing no slashes. This error fires when the host portion fails those checks.","triggerScenarios":"Parsing a stampers entry whose text before '=' is empty, lacks a dot (e.g. 'localhost=RWT...'), or contains '/' (e.g. a URL was given as the host).","commonSituations":"Putting the https:// identity URL on the left side of '=' instead of the pin side; using a bare hostname like 'localhost'; accidentally swapping host and pin around the '='.","solutions":["Move the https://github.com/... identity to the pin (right) side of '='","Use a dotted host name on the left side, e.g. registry.example.com=RWT...","Remove slashes from the host portion"],"exampleFix":"// before\n[packslip.stampers]\n\"https://github.com/org/registry/=RWTvK7...\"\n// after\n[packslip.stampers]\n\"registry.example.com=https://github.com/org/registry/\"","handlingStrategy":"validation","validationCode":"let host = spec.split('=').next().unwrap_or(\"\");\nif host.is_empty() || !host.contains('.') || host.contains('/') {\n    return Err(format!(\"{host:?} is not a valid stamper host\"));\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"is not a host name\") => eprintln!(\"use a dotted hostname left of '='; put https:// identities on the right\"),\n    other => other?,\n}","preventionTips":["Keep https:// identity prefixes on the PIN side of '='","Use fully-qualified dotted host names for the host side","Don't put URLs or paths in the host portion","Review stampers config entries for swapped host/pin"],"tags":["configuration","packslip","stampers","format"],"backgroundTag":"invalid-argument-format","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}