Base git command scoped to repo via -C.
Stdin null + env vars prevent any interactive prompt from opening /dev/tty:
GIT_TERMINAL_PROMPT=0 — disables git’s own credential prompts
GIT_SSH_COMMAND — BatchMode=yes + ConnectTimeout=5 so SSH fails fast
Spawn cmd in its own process group with piped stdout/stderr.
Kills the entire group on timeout so ssh + credential helpers are also reaped.
Joins reader threads after kill to prevent thread leaks.