Problem
The _run_git_interactive fallback for auth requires an interactive terminal. In non-interactive contexts (headless Raspberry Pi, systemd service, Docker), this can hang indefinitely.
Proposed solution
- Detect whether the environment is interactive before attempting interactive git auth.
- Provide a non-interactive fallback with a clear error message.
- Support token-based auth as an alternative.
Implementation notes
- Check
sys.stdin.isatty() before calling _run_git_interactive.
- Support
GIT_TOKEN or GITHUB_TOKEN env vars for non-interactive auth.
- Add a configurable timeout to prevent indefinite hangs.
Acceptance criteria
- Git operations in non-interactive environments fail gracefully instead of hanging.
- Clear error message explains how to configure auth for headless use.
- Token-based auth works when the env var is set.
- Interactive auth still works when a TTY is available.
Problem
The
_run_git_interactivefallback for auth requires an interactive terminal. In non-interactive contexts (headless Raspberry Pi, systemd service, Docker), this can hang indefinitely.Proposed solution
Implementation notes
sys.stdin.isatty()before calling_run_git_interactive.GIT_TOKENorGITHUB_TOKENenv vars for non-interactive auth.Acceptance criteria