jdx/mise · error
invalid bootstrap {kind} name '{name}': use at most 32 ASCII
Error message
invalid bootstrap {kind} name '{name}': use at most 32 ASCII letters, digits, '_' or '-', with an optional trailing '$' What it means
Bootstrap account (user or group) names are validated against passwd/group-safe rules: at most 32 characters of ASCII letters, digits, '_' or '-', with an optional trailing '$'. Names that break these rules would produce invalid /etc/passwd or /etc/group entries, so mise rejects them up front.
Source
Thrown at src/system/accounts.rs:718
)
}
fn validate_name(kind: &str, name: &str) -> Result<()> {
let base = name.strip_suffix('$').unwrap_or(name);
let mut characters = base.chars();
let valid = !name.is_empty()
&& name.len() <= 32
&& characters
.next()
.is_some_and(|character| character == '_' || character.is_ascii_alphabetic())
&& characters.all(|character| {
character == '_'
|| character == '-'
|| character.is_ascii_digit()
|| character.is_ascii_alphabetic()
});
if !valid {
bail!(
"invalid bootstrap {kind} name '{name}': use at most 32 ASCII letters, digits, '_' or '-', with an optional trailing '$'"
);
}
Ok(())
}
fn validate_account_path(name: &str, field: &str, path: &std::path::Path) -> Result<()> {
if !path.is_absolute() {
bail!("bootstrap user '{name}' {field} must be an absolute path");
}
if path
.to_string_lossy()
.chars()
.any(|character| character == ':' || character == '\n' || character == '\r')
{
bail!("bootstrap user '{name}' {field} must not contain ':', CR, or LF");
}
Ok(())View on GitHub (pinned to afd2eddd3a)
Solutions
- Shorten the name to 32 characters or fewer
- Replace invalid characters with '-' or '_'
- Drop any trailing or embedded special characters; keep an optional single trailing '$'
Example fix
// before [users."ci.bot@example.com"] // after [users."ci-bot"]
Defensive patterns
Strategy: validation
Validate before calling
function validAccountName(name) {
return /^[A-Za-z0-9_-]{1,31}\$?$/.test(name) && name.length <= 32;
} Try / catch
try {
await run('mise bootstrap apply');
} catch (e) {
if (/invalid bootstrap .* name/.test(e.message)) {
throw new Error('Fix the account name in config: letters/digits/_/- up to 32 chars, optional trailing $');
}
throw e;
} Prevention
- Validate names with /^[A-Za-z0-9_-]{1,31}\$?$/ before writing config
- Never derive account names from emails, URLs, or branch names without sanitizing
- Cap generated names at 32 characters
When it happens
Trigger: Declaring a bootstrap user or group whose name exceeds 32 characters, contains spaces, dots, uppercase-non-ASCII, or other special characters, or ends with characters other than the allowed set ('$' allowed only trailing).
Common situations: Using an email address as a username ('ci.bot@example.com'); names with dots from Windows conventions; names generated from branch or project names containing slashes.
Understand the failure class
Background: "invalid id" errors: invalid identifier format — why libraries reject IDs before lookup, and how to fix them — this error's family across 37 libraries.
Related errors
- bootstrap user '{name}' comment must not contain ':', CR, or
- bootstrap user '{name}' {field} must be an absolute path
- bootstrap user '{name}' {field} must not contain ':', CR, or
- invalid bootstrap secret name '{name}': use ASCII letters, d
- managed path '{}' notifies unconfigured bootstrap service '{
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/a1b6839ae55b62c7.
Report an issue: GitHub.