OSError: [Errno 2] Keine solche Datei oder kein solches Verzeichnis auf GitPython
Ich verwende GitPython, um ein Remote-Repository auf meinen Computer abzurufen. Der folgende Code funktioniert gut auf meinem Ubuntu 12.04, aber auf meinem amazon ec2 auf einem Ubuntu 11.10-Server erhalte ich den OSError: [Errno 2] Kein solcher Datei- oder Verzeichnisfehler.
repo = git.Repo.init(fs_path)
origin = repo.create_remote('origin',repo_url)
origin.fetch()
origin.pull(origin.refs[0].remote_head)
Wenn ich den Block in einem Skript ausführe, erhalte ich keine Fehlermeldungen. Aber wenn ich diese Schritte in der Interactive Shell versuche, erhalte ich diesen Stack-Trace:
>>> import git
>>> repo = git.Repo.init("/var/wwww/dir/subdir/tmp/12")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/GitPython-0.3.2.RC1-py2.7.egg/git/repo/base.py", line 656, in init
output = git.init(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/GitPython-0.3.2.RC1-py2.7.egg/git/cmd.py", line 227, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/GitPython-0.3.2.RC1-py2.7.egg/git/cmd.py", line 456, in _call_process
return self.execute(call, **_kwargs)
File "/usr/local/lib/python2.7/dist-packages/GitPython-0.3.2.RC1-py2.7.egg/git/cmd.py", line 335, in execute
**subprocess_kwargs
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1239, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
>>>
Aber ich habe keine derartigen Probleme auf meinem lokalen Computer. Keine Ahnung, was los ist. Jede Hilfe wird sehr geschätzt!