{"record":{"id":"e1acea184a37e701","repo":"eyaltoledano/claude-task-master","slug":"git-is-not-installed-or-not-accessible-errormes","errorCode":null,"errorMessage":"Git is not installed or not accessible: ${errorMessage}","messagePattern":"Git is not installed or not accessible: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/tm-core/src/modules/git/adapters/git-adapter.ts","lineNumber":96,"sourceCode":"\n\t/**\n\t * Validates that git is installed and accessible.\n\t * Checks git binary availability and version.\n\t *\n\t * @returns {Promise<void>}\n\t * @throws {Error} If git is not installed or not accessible\n\t *\n\t * @example\n\t * await git.validateGitInstallation();\n\t * console.log('Git is installed');\n\t */\n\tasync validateGitInstallation(): Promise<void> {\n\t\ttry {\n\t\t\tawait this.git.version();\n\t\t} catch (error) {\n\t\t\tconst errorMessage =\n\t\t\t\terror instanceof Error ? error.message : String(error);\n\t\t\tthrow new Error(\n\t\t\t\t`Git is not installed or not accessible: ${errorMessage}`\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Gets the git version information.\n\t *\n\t * @returns {Promise<{major: number, minor: number, patch: number, agent: string}>}\n\t *\n\t * @example\n\t * const version = await git.getGitVersion();\n\t * console.log(`Git version: ${version.major}.${version.minor}.${version.patch}`);\n\t */\n\tasync getGitVersion(): Promise<{\n\t\tmajor: number;\n\t\tminor: number;\n\t\tpatch: number;","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/packages/tm-core/src/modules/git/adapters/git-adapter.ts#L78-L114","documentation":"Plain Error thrown by GitAdapter.validateGitInstallation when the underlying `git version()` call (via simple-git) rejects — meaning the git binary is missing, not on PATH, or otherwise unexecutable. The original message from simple-git/Node (ENOENT, EACCES, spawn failure) is embedded after the prefix.","triggerScenarios":"Calling validateGitInstallation() on a machine without git installed; git present but not on PATH (minimal Docker images, CI containers); a corrupted or permission-denied git binary; broken PATH inside spawned processes or GUI-launched apps.","commonSituations":"Dockerfile based on alpine/slim without `apk add git` / `apt-get install git`; CI runners with restricted PATH; macOS apps launched from Finder missing the shell PATH; corporate machines where git install is blocked.","solutions":["Install git (`apt-get install git`, `apk add git`, `brew install git`, or winget/choco on Windows)","Verify with `git --version` in the same shell/environment the app runs in","Fix PATH so the git binary directory is included (especially for GUI-launched processes or containers)","Check the embedded cause message: ENOENT means not found, EACCES means permission denied on the binary","Point simple-git at an explicit git binary path if git lives in a non-standard location"],"exampleFix":"// Dockerfile before\nFROM node:20-alpine\n// after\nFROM node:20-alpine\nRUN apk add --no-cache git","handlingStrategy":"validation","validationCode":"import { execFile } from 'child_process';\nimport { promisify } from 'util';\nconst run = promisify(execFile);\ntry {\n  await run('git', ['--version']);\n} catch {\n  throw new Error('git binary not found on PATH; install git first');\n}","typeGuard":"function isSpawnError(e: unknown): e is NodeJS.ErrnoException {\n  return e instanceof Error && ('code' in e || 'errno' in e);\n}","tryCatchPattern":"try {\n  await git.validateGitInstallation();\n} catch (e) {\n  console.error(e.message); // includes the underlying spawn/ENOENT detail\n  process.exitCode = 1; // or disable git-dependent features\n}","preventionTips":["Install git in Docker images (apk add git / apt-get install git)","Run `git --version` as a startup health check in CLI entry points","Ensure PATH includes git for GUI-launched and spawned processes","Document git as a hard runtime dependency of your tool"],"tags":["git","environment","dependency","path"],"backgroundTag":"git-not-installed","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}