jdx/mise · error
packslip.stampers entry
Error message
packslip.stampers entry {spec:?}: {host:?} is not a host name What it means
Raised by packslip_stamps::Stamper::parse when the host part of a `host=PIN` stamper entry is empty, contains no dot, or contains a slash — none of which constitute a valid host name. The host must look like a DNS name (e.g. "github.com") because it keys the per-host stamp state.
Solutions
- Use a proper dotted host name before '=', e.g. "example.com=PUBKEY".
- Remove any scheme/path from the host: write "github.com=...", not "https://github.com/...=..." (the https:// prefix belongs on the pin side for keyless signing).
- If the key was meant to be the pin, ensure the format is host=PUBKEY with the host first.
Example fix
// before (mise.toml) stampers = ["https://github.com/org/repo/=MIIB..."] // after stampers = ["example.com=https://github.com/org/repo/"]
Defensive patterns
Strategy: validation
Validate before calling
// check the host part of a stamper entry before parsing
function isValidStamperHost(spec) {
const [host] = spec.split("=");
return Boolean(host && host.includes(".") && !host.includes("/"));
} Type guard
function hasValidHost(spec) {
const host = (spec.split("=")[0] || "").trim();
return host.length > 0 && /\./.test(host) && !host.includes("/");
} Try / catch
try {
parseStamper(spec);
} catch (e) {
if (String(e).includes("is not a host name")) {
throw new Error(`Use a bare dotted hostname before '=' in "${spec}" (no scheme, no path).`);
} else throw e;
} Prevention
- Never put "https://" or a path in the host slot — that belongs on the pin side for keyless signers.
- Use fully-qualified domain names (with a dot) as the host.
- Keep a checked example entry in your config as a template.
When it happens
Trigger: Parsing a stampers entry whose part before '=' is empty (=key), a single label without a dot (localhost), or contains a slash (https://example.com=... or a path used as host).
Common situations: Putting a full URL on the left side of '=' instead of just the hostname; writing a bare key with an empty host (=MIIB...); using 'localhost' or an internal alias without a dot.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- packslip.stampers entry
- Invalid platform format
- the stamp list at is for , not
- additional_artifacts must be an array in lockfile
- an exec entry with no command
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/e0fbfefb1489da2c.
Report an issue: GitHub.
Appendix: source
Thrown at src/packslip_stamps.rs:56
pub(crate) host: String,
pin: Pin,
}
impl Stamper {
/// `host=PIN`, where PIN is a minisign public key line, the path of a
/// `.pub` file, or an `https://` identity prefix for a keyless signer
/// on GitHub such as `https://github.com/org/registry/`.
pub(crate) fn parse(spec: &str) -> Result<Stamper> {
let spec = spec.trim();
let Some((host, pin)) = spec.split_once('=') else {
bail!(
"packslip.stampers entry {spec:?} has no pin; write host=PUBKEY, host=path/to/key.pub, or host=https://github.com/org/repo/"
);
};
let host = host.trim();
let pin = pin.trim();
if host.is_empty() || !host.contains('.') || host.contains('/') {
bail!("packslip.stampers entry {spec:?}: {host:?} is not a host name");
}
let pin = if pin.starts_with("https://") {
Pin::Identity(Policy {
issuer: Some(GITHUB_ISSUER.into()),
identity: None,
identity_prefix: Some(pin.to_string()),
})
} else {
let text = if std::path::Path::new(pin).is_file() {
file::read_to_string(pin)?
} else {
pin.to_string()
};
let key = packslip::minisign::PublicKey::parse(&text)
.map_err(|e| eyre!("packslip.stampers entry for {host}: pubkey: {e}"))?;
Pin::Key(key)
};
Ok(Stamper {View on GitHub (pinned to 533346cc37)