tinyhumansai/openhuman · error · anyhow::Error
refusing to run git in {}: its repository config sets `{key}
Error message
refusing to run git in {}: its repository config sets `{key}`, which is not on the allowlist of configuration this tool will run under. Several git config keys name a command git then executes, and this directory is agent-writable, so unrecognised configuration is treated as untrusted rather than honoured. What it means
Error "refusing to run git in {}: its repository config sets `{key}`, which is not on the allowlist of configuration this tool will run under. Several git config keys name a command git then executes, and this directory is agent-writable, so unrecognised configuration is treated as untrusted rather than honoured." thrown in tinyhumansai/openhuman.
Source
Thrown at src/openhuman/tools/impl/system/workspace_state.rs:329
let key = entry.split('\n').next().unwrap_or(entry);
if !ALLOWED_REPO_CONFIG.contains(&normalise_config_key(key).as_str()) {
return Ok(Some(key.to_string()));
}
}
Ok(None)
}
async fn run_git(dir: &std::path::Path, args: &[&str]) -> anyhow::Result<String> {
if let Some(key) = repo_config_is_inert(dir).await? {
// The refusal is otherwise only visible folded into the tool's own
// output, which is not greppable when an operator is asking why a
// workspace stopped reporting. Correlation fields: the directory and
// the key that caused it.
tracing::debug!(
"[workspace_state] refusing to run git: dir={}, disallowed_config_key={key}",
dir.display()
);
anyhow::bail!(
"refusing to run git in {}: its repository config sets `{key}`, which is \
not on the allowlist of configuration this tool will run under. \
Several git config keys name a command git then executes, and this \
directory is agent-writable, so unrecognised configuration is treated \
as untrusted rather than honoured.",
dir.display()
)
}
let output = hardened_git(dir).args(args).output().await?;
if output.status.success() {
Ok(String::from_utf8_lossy(&output.stdout).to_string())
} else {
anyhow::bail!(
"git {} failed: {}",
args.join(" "),
String::from_utf8_lossy(&output.stderr)View on GitHub (pinned to 7491200858)
Solutions
- Inspect the repo config (git config --local --list) for the named key
- Remove or correct the unrecognised key if it was added accidentally
- Add genuinely needed safe keys to ALLOWED_REPO_CONFIG after security review
- Avoid committing agent-controlled .git/config into the workspace
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/tools/impl/system/workspace_state.rs:329 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/cc24a642d04e6584.
Report an issue: GitHub.