{"record":{"id":"9c687e744fb7f1ee","repo":"aaif-goose/goose","slug":"failed-to-fetch-at","errorCode":null,"errorMessage":"Failed to fetch at {}","messagePattern":"Failed to fetch at (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/goose-cli/src/recipes/github_recipe.rs","lineNumber":198,"sourceCode":"            .status()\n            .map_err(|_: std::io::Error| anyhow::anyhow!(error_message.clone()))?;\n\n        if status.success() {\n            Ok(local_repo_path)\n        } else {\n            Err(anyhow::anyhow!(error_message))\n        }\n    }\n}\n\nfn fetch_origin(local_repo_path: &Path) -> Result<()> {\n    let error_message: String = format!(\"Failed to fetch at {}\", local_repo_path.to_str().unwrap());\n    let status = git_command()\n        .args([\"fetch\", \"origin\"])\n        .current_dir(local_repo_path)\n        .set_no_window()\n        .status()\n        .map_err(|_| anyhow::anyhow!(error_message.clone()))?;\n\n    if status.success() {\n        Ok(())\n    } else {\n        Err(anyhow::anyhow!(error_message))\n    }\n}\n\nfn get_folder_from_github(local_repo_path: &Path, recipe_name: &str) -> Result<PathBuf> {\n    let ref_and_path = format!(\"origin/main:{}\", recipe_name);\n    let output_dir = env::temp_dir().join(temp_child_name(recipe_name));\n\n    if output_dir.exists() {\n        fs::remove_dir_all(&output_dir)?;\n    }\n    fs::create_dir_all(&output_dir)?;\n\n    let archive_output = git_command()","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose-cli/src/recipes/github_recipe.rs#L180-L216","documentation":"fetch_origin runs `git fetch origin` inside the local clone using goose's git_command() helper (crates/goose-cli/src/recipes/github_recipe.rs:189-198). This error is the spawn io failure: the git binary could not be executed. Note the asymmetry: cloning goes through `gh` (which may shell out to its bundled logic), but fetching requires a real `git` on PATH — a machine can pass [126] and still fail here.","triggerScenarios":"Command::new(\"git\").status() io error: git not installed (ErrorKind::NotFound), exec permission/format error, or the current_dir passed to the command no longer exists (temp clone removed by an earlier cleanup or OS temp reaper).","commonSituations":"Minimal containers (gh installed, git omitted), CI images without git, hosts where /tmp cleaners delete the clone mid-flow, or restricted sandboxes denying exec of git.","solutions":["Install git (`apt-get install git`, `brew install git`, etc.) and confirm `command -v git && git --version` in goose's environment","If git is present, check that the clone directory printed/used still exists before the fetch — stale temp state can be cleared by removing the goose temp clone dirs and retrying","In sandboxed environments, allow exec of git in the sandbox profile"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# goose shells out to both gh and git; verify both exist\ncommand -v gh && command -v git && git --version","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install git in addition to gh on minimal/container images","Include `git --version` in environment pre-flight checks for goose"],"tags":["goose-cli","git","fetch","external-tool"],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}