Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught GitCommandNotFound in cmd.py line 1276 #3531

Open
altjx opened this issue Mar 14, 2025 · 0 comments
Open

Uncaught GitCommandNotFound in cmd.py line 1276 #3531

altjx opened this issue Mar 14, 2025 · 0 comments
Labels

Comments

@altjx
Copy link

altjx commented Mar 14, 2025

Aider version: 0.77.0
Python version: 3.12.8
Platform: macOS-15.3.1-arm64-64bit
Python implementation: CPython
Virtual environment: Yes
OS: Darwin 24.3.0 (64bit)
Git information unavailable

An uncaught exception occurred:

Traceback (most recent call last):
  File "cmd.py", line 1262, in execute
    proc = safer_popen(
           ^^^^^^^^^^^^
  File "subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "main.py", line 723, in main
    git_root = setup_git(git_root, io)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "main.py", line 130, in setup_git
    user_name = repo.git.config("--get", "user.name") or None
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "cmd.py", line 986, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "cmd.py", line 1599, in _call_process
    return self.execute(call, **exec_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "cmd.py", line 1276, in execute
    raise GitCommandNotFound(redacted_command, err) from err
git.exc.GitCommandNotFound: Cmd('git') not found due to: FileNotFoundError('[Errno 2] No such file or directory: 'git'')
  cmdline: git config --get user.name

Tried running aider, which generated an exception. Tried having it automatically open a PR, and that failed too. Running macOS Sequoia 15.3.1 on a Mac Studio with an M2 Ultra. I also have git and everything else installed to manage my github repo from the CLI, FWIW.

Start to finish from install to error

Image

Hope this information helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants