diff --git a/src/git.rs b/src/git.rs index 3032aac..d21c56b 100644 --- a/src/git.rs +++ b/src/git.rs @@ -617,6 +617,8 @@ impl RemoteInfo { /// Convenience wrapper around calling `git ls-remote` async fn fetch_remote(args: &[&str]) -> Result> { let process = Command::new("git") + // Disable any interactive login attempts, failing gracefully instead + .env("GIT_TERMINAL_PROMPT", "0") .arg("ls-remote") .args(args) .output() diff --git a/src/nix.rs b/src/nix.rs index 9825f3d..787a261 100644 --- a/src/nix.rs +++ b/src/nix.rs @@ -41,6 +41,8 @@ pub async fn nix_prefetch_git( output.arg("--fetch-submodules"); } let output = output + // Disable any interactive login attempts, failing gracefully instead + .env("GIT_TERMINAL_PROMPT", "0") .arg(url) .arg(git_ref.as_ref()) .output()