Вот некоторые данные для моей настройки.
- Версия Git: 2.45.2
- Версия Python: 3.12.4 (в виртуальная среда)
- Модуль GitPython: 3.1.43
Код: Выделить всё
Traceback (most recent call last):
File "/path/to/auth_tester.py", line 5, in
repository.remote().pull()
File "/path/to/pyenv/lib/python3.12/site-packages/git/remote.py", line 1123, in pull
res = self._get_fetch_info_from_stderr(proc, progress, kill_after_timeout=kill_after_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/to/pyenv/lib/python3.12/site-packages/git/remote.py", line 895, in _get_fetch_info_from_stderr
proc.wait(stderr=stderr_text)
File "/path/to/pyenv/lib/python3.12/site-packages/git/cmd.py", line 834, in wait
raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
cmdline: git pull -v -- origin
Код: Выделить всё
import os
from git import Repo
repository = Repo(".")
repository.remote().pull()
Подробнее здесь: https://stackoverflow.com/questions/791 ... repository
Мобильная версия