jdx/mise · error
network Git calls do not accept a work tree, alternate index
Error message
network Git calls do not accept a work tree, alternate index, or stdin
What it means
API-misuse guard in Git network_output: a network plumbing call (fetch/push/ls-remote) was constructed with a work tree, alternate index, or stdin redirection, which the network-call API forbids — network commands must run with the user's normal git configuration and environment. This is an internal contract check, not a user-input error.
Source
Thrown at src/git.rs:875
.stderr(std::process::Stdio::inherit())
.stdin(std::process::Stdio::null());
cmd.status()
.wrap_err_with(|| format!("failed to run {}", describe_plumbing(&cmd)))
}
/// Runs the call and returns its trimmed stdout.
pub(crate) fn output_str(&self, call: PlumbingCall<'_>) -> Result<String> {
let out = self.output(call)?;
Ok(String::from_utf8_lossy(&out).trim().to_string())
}
/// Runs a network command (`fetch`, `push`, `ls-remote`) against this
/// repository with the user's normal git configuration: credential
/// helpers, ssh settings, and URL rewrites apply, while hooks, filters,
/// and aliases still cannot act on mise's repository because only
/// plumbing runs here. Prompts are disabled when nobody is attending.
pub(crate) fn network_output(&self, call: PlumbingCall<'_>) -> Result<std::process::Output> {
eyre::ensure!(
call.work_tree.is_none() && call.index_file.is_none() && call.stdin.is_none(),
"network Git calls do not accept a work tree, alternate index, or stdin"
);
let git =
plumbing_binary().ok_or_else(|| eyre!("no unattended git executable is available"))?;
let mut cmd = std::process::Command::new(git);
sanitize_git_command(&mut cmd);
if !console::user_attended_stderr() {
cmd.env("GIT_TERMINAL_PROMPT", "0");
}
cmd.args([
"-c",
&github_credential_config("github.com"),
"-c",
&github_credential_config("github.com:443"),
]);
cmd.env("GIT_OPTIONAL_LOCKS", "0")
.env("LC_ALL", "C")View on GitHub (pinned to afd2eddd3a)
Solutions
- Fix the call site to use the plain network call API without work tree/index/stdin overrides
- Use the non-network plumbing API for local operations that need those options
- Add/adjust the debug output to identify the offending PlumbingCall
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/git.rs:875 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/4aca7d86cfc409d2.
Report an issue: GitHub.