usestrix/strix · error · ValueError
Git is not installed or not available in PATH. Please instal
Error message
Git is not installed or not available in PATH. Please install Git to clone repositories.
What it means
The FileNotFoundError branch of the clone subprocess: the git binary itself could not be executed (which() may have passed earlier if PATH changed, or the clone ran in a different context). It is converted to a friendlier ValueError telling the user to install Git, chained from the original error.
Source
Thrown at strix/interface/utils.py:1574
subprocess.run( # noqa: S603
[
git_executable,
"clone",
repo_url,
str(clone_path),
],
capture_output=True,
text=True,
check=True,
)
return str(clone_path.absolute())
except subprocess.CalledProcessError as e:
detail = e.stderr if hasattr(e, "stderr") and e.stderr else str(e)
raise ValueError(f"Could not clone repository {repo_url}: {detail}") from e
except FileNotFoundError as e:
raise ValueError(
"Git is not installed or not available in PATH. "
"Please install Git to clone repositories."
) from e
def check_docker_connection() -> Any:
try:
return docker.from_env()
except DockerException:
console = Console()
error_text = Text()
error_text.append("DOCKER NOT AVAILABLE", style="bold red")
error_text.append("\n\n", style="white")
error_text.append("Cannot connect to Docker daemon.\n", style="white")
error_text.append(
"Please ensure Docker Desktop is installed and running, and try running strix again.\n",
style="white",
)View on GitHub (pinned to 8551339130)
Solutions
- Install Git or repair its installation (apt/apk/brew/installer), then restart the shell or CI job so PATH refreshes.
- Confirm `git --version` works in the exact environment that runs strix.
- Avoid mutating PATH between processes; pass a stable environment to the scan.
Example fix
# CI - before
jobs: {scan: {runs-on: ubuntu-latest, steps: [{run: strix -n -t $REPO}]}} # container without git
# CI - after - use a job/container image that includes git
container: {image: 'python:3.12'}
steps:
- run: apt-get update && apt-get install -y git
- run: strix -n -t $REPO Defensive patterns
Strategy: validation
Validate before calling
import shutil
if shutil.which("git") is None:
raise SystemExit("Git missing: install it and ensure `git --version` works in this environment") Try / catch
try:
clone_path = clone_repository(repo_url, run_name)
except ValueError as e:
if "Git is not installed" in str(e):
raise SystemExit("Install Git (and restart the shell/CI job so PATH refreshes) then retry.") from e
raise Prevention
- Restart shells/CI jobs after installing or moving git so PATH is fresh
- Pin a base image that includes git for automation jobs
When it happens
Trigger: subprocess.run(['git', ...]) inside clone_repository raising FileNotFoundError — e.g. PATH was modified between the which() check and the clone, or the git shim points at a removed binary.
Common situations: Virtualenv activation scripts or docker exec altering PATH mid-run; git uninstalled while a session was open; Windows Git Bash shims broken after an update.
Related errors
- Git executable not found in PATH
- Could not clone repository {repo_url}: {detail}
- No LLM model configured. Set STRIX_LLM env or pass model= to
- The interactive interface could not start: {exc}
- No model configured. Set STRIX_LLM first.
AI-assisted analysis of usestrix/strix@8551339130 (2026-08-15).
Data as JSON: /api/errors/80c425be8479868e.
Report an issue: GitHub.