jdx/mise · error
trust the configuration before using its encryption recipien
Error message
trust the configuration before using its encryption recipients: {} What it means
Before using `[history.encryption].recipients` from a config layer, mise checks that the config file is trusted (`crate::config::config_file::is_trusted`). If a layer declares encryption recipients but is not trusted, `file_recipients` bails so untrusted code cannot silently define who can decrypt your files.
Source
Thrown at src/system/history/config.rs:44
pub origin: Option<OriginTomlConfig>,
#[serde(default)]
pub encryption: Option<FileEncryptionConfig>,
}
/// Public recipients shared by every encrypted dotfile.
#[derive(Debug, Clone, Deserialize, Default)]
#[serde(deny_unknown_fields)]
pub(crate) struct FileEncryptionConfig {
#[serde(default)]
pub recipients: Vec<String>,
}
pub(crate) fn file_recipients() -> Result<Vec<String>> {
let mut recipients = Vec::new();
for (path, layer) in layers()? {
if let Some(encryption) = layer.encryption {
if !crate::config::config_file::is_trusted(&path) {
eyre::bail!(
"trust the configuration before using its encryption recipients: {}",
display_path(&path)
);
}
recipients = encryption.recipients;
if recipients.is_empty() {
eyre::bail!(
"[history.encryption].recipients must not be empty; configure recipients before capturing encrypted files"
);
}
}
}
Ok(recipients)
}
/// `[history.origin]`.
#[derive(Debug, Clone, Deserialize, PartialEq, Eq)]
#[serde(deny_unknown_fields)]View on GitHub (pinned to afd2eddd3a)
Solutions
- Run `mise trust <path-to-config>` to trust the config file, then retry.
- Re-run trust after every edit to the config (mise re-hashes trusted files).
- Remove the `[history.encryption]` block from untrusted/shared configs and keep recipients in a trusted local file.
Example fix
# before mise history snapshot # fails: trust the configuration ... # after mise trust mise.toml mise history snapshot
Defensive patterns
Strategy: validation
Validate before calling
mise trust mise.toml # run before any history/encryption operation on a new config
Prevention
- Always `mise trust` new configs before running mise commands
- Re-trust after editing a trusted config (hash changes)
- Keep [history.encryption] only in trusted, local config files
When it happens
Trigger: `file_recipients()` iterates config layers; a layer has `encryption` set but `is_trusted(&path)` returns false for that file (never run `mise trust` on it, or hash changed after edit).
Common situations: Cloning a repo with a mise.toml containing `[history.encryption]` and running mise before trusting the file; editing a previously-trusted config so its hash no longer matches.
Related errors
- Config file(s) in {} are not trusted: {} Trust them with `mi
- [dotfiles]."{}": target is not a safe OCI path
- remote cache URL must use HTTPS except for loopback developm
- no age recipients to encrypt for
- --changed requires trusted configuration: {}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/6f9ffb066b5e1ee7.
Report an issue: GitHub.