Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[GitPython >= 2.1.4] Can't import without git CLI #657
Comments
@njalerikson Sorry for the duplicate issue here, I did search beforehand but did not find the other issue. |
@terminalmage no worries just wanted to link everything together so all the efforts to fix the issue are aware of the other efforts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of Problem
Since GitPython 2.1.4, the initial
import git
fails because it invokes the git CLI, raising agit.exc.GitCommandNotFound
error. However, due to the chicken-and-egg nature of this import, it is impossible for one to catch agit.exc.GitCommandNotFound
error.Steps to Reproduce
Install GitPython >= 2.1.4 on a box without git installed on it. An easy way to do this is to launch a Cent 7 docker container (which does not come with git installed off the base image), and then install GitPython (first installing EPEL repo and pip for ease of installation).
Now attempt to import:
If you then downgrade to before version 2.1.4, the import works fine since the initial import no longer seems to be trying to invoke the git CLI: