Uncaught GitCommandError in cmd.py line 1388
Context:
- the image was pasted from the clipboard with /paste.
- aider is installed with pipx on EndeavourOS
- aider is running in architect mode and the error came only after agreeing to apply the code changes
model config:
- model: openrouter/anthropic/claude-3.5-sonnet:beta
- weak-model: openrouter/anthropic/claude-3-5-haiku-20241022
- cache-prompts: True
Aider version: 0.63.0 Python version: 3.12.7 Platform: Linux-6.11.6-arch1-1-x86_64-with-glibc2.40 Python implementation: CPython Virtual environment: Yes OS: Linux 6.11.6-arch1-1 (64bit) Git version: git version 2.47.0
An uncaught exception occurred:
Traceback (most recent call last):
File "aider", line 8, in <module>
sys.exit(main())
^^^^^^
File "main.py", line 832, in main
coder.run()
File "base_coder.py", line 741, in run
self.run_one(user_message, preproc)
File "base_coder.py", line 784, in run_one
list(self.send_message(message))
File "base_coder.py", line 1249, in send_message
self.reply_completed()
File "architect_coder.py", line 36, in reply_completed
editor_coder = Coder.create(**new_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "base_coder.py", line 155, in create
res = coder(main_model, io, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "base_coder.py", line 358, in __init__
if self.repo and self.repo.git_ignored_file(fname):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "repo.py", line 337, in git_ignored_file
if self.repo.ignored(path):
^^^^^^^^^^^^^^^^^^^^^^^
File "base.py", line 1013, in ignored
proc: str = self.git.check_ignore(*paths)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "cmd.py", line 986, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "cmd.py", line 1598, in _call_process
return self.execute(call, **exec_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "cmd.py", line 1388, in execute
raise GitCommandError(redacted_command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git check-ignore /tmp/tmpom4qp66j/clipboard_image.png
stderr: 'fatal: /tmp/tmpom4qp66j/clipboard_image.png: '/tmp/tmpom4qp66j/clipboard_image.png' is outside repository at '/mnt/SSD_2TB/Projects/dahannes.com-portal''
Thanks for trying aider and filing this issue.
This looks like a duplicate of #1233. Please see the comments there for more information, and feel free to continue the discussion within that issue.
I'm going to close this issue for now. But please let me know if you think this is actually a distinct issue and I will reopen this issue.
The fix is available in the main branch. You can get it by installing the latest version from github:
aider --install-main-branch
# or...
python -m pip install --upgrade --upgrade-strategy only-if-needed git+https://github.com/Aider-AI/aider.git
If you have a chance to try it, let me know if it works better for you.
Thank you Paul!