You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use git to create a repo in a subdirectory named 'test'
I try to clone this to a directory named test2 with GitPython using
from git import Repo
Repo.clone_from('test', 'test2')
but get the Traceback
Traceback (most recent call last):
File "", line 1, in
File "C:\BaRT\Python34\lib\site-packages\gitpython-0.3.6-py3.4.egg\git\repo\base.py", line 844, in clone_from
return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB, progress,**kwargs)
File "C:\BaRT\Python34\lib\site-packages\gitpython-0.3.6-py3.4.egg\git\repo\base.py", line 814, in _clone
repo = cls(os.path.abspath(path), odbt=odbt)
File "C:\BaRT\Python34\lib\site-packages\gitpython-0.3.6-py3.4.egg\git\repo\base.py", line 130, in init
raise NoSuchPathError(epath)
git.exc.NoSuchPathError: C:\Users\jsmith\git\test2
If I create the directory first I get
Traceback (most recent call last):
File "", line 1, in
File "C:\BaRT\Python34\lib\site-packages\gitpython-0.3.6-py3.4.egg\git\repo\base.py", line 844, in clone_from
return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB, progress,**kwargs)
File "C:\BaRT\Python34\lib\site-packages\gitpython-0.3.6-py3.4.egg\git\repo\base.py", line 814, in _clone
repo = cls(os.path.abspath(path), odbt=odbt)
File "C:\BaRT\Python34\lib\site-packages\gitpython-0.3.6-py3.4.egg\git\repo\base.py", line 162, in init
raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: C:\Users\jsmith\git\test2
The text was updated successfully, but these errors were encountered:
Still fails. I figured out that problem is that the git command was not on the path. I think in this case the Traceback should be clearer about the problem.
This seems to be something special on your system though, as, according to gitpython, the git clone command was executed successfully, even though it didn't do anything.
There is no way this can be detected, which is why I have to close this issue.
I use git to create a repo in a subdirectory named 'test'
I try to clone this to a directory named test2 with GitPython using
from git import Repo
Repo.clone_from('test', 'test2')
but get the Traceback
Traceback (most recent call last):
File "", line 1, in
File "C:\BaRT\Python34\lib\site-packages\gitpython-0.3.6-py3.4.egg\git\repo\base.py", line 844, in clone_from
return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB, progress,**kwargs)
File "C:\BaRT\Python34\lib\site-packages\gitpython-0.3.6-py3.4.egg\git\repo\base.py", line 814, in _clone
repo = cls(os.path.abspath(path), odbt=odbt)
File "C:\BaRT\Python34\lib\site-packages\gitpython-0.3.6-py3.4.egg\git\repo\base.py", line 130, in init
raise NoSuchPathError(epath)
git.exc.NoSuchPathError: C:\Users\jsmith\git\test2
If I create the directory first I get
Traceback (most recent call last):
File "", line 1, in
File "C:\BaRT\Python34\lib\site-packages\gitpython-0.3.6-py3.4.egg\git\repo\base.py", line 844, in clone_from
return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB, progress,**kwargs)
File "C:\BaRT\Python34\lib\site-packages\gitpython-0.3.6-py3.4.egg\git\repo\base.py", line 814, in _clone
repo = cls(os.path.abspath(path), odbt=odbt)
File "C:\BaRT\Python34\lib\site-packages\gitpython-0.3.6-py3.4.egg\git\repo\base.py", line 162, in init
raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: C:\Users\jsmith\git\test2
The text was updated successfully, but these errors were encountered: