-
-
Notifications
You must be signed in to change notification settings - Fork 933
Windows - ImportError: Failed to initialize: Bad git executable. #816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the detailed report! To me it appears that maybe it found the executable, but failed to obtain version information from it. It might be possible to learn more by boosting the log-level via Can you post the results here, if there are any? |
@Byron Thanks for the response! I was able to figure out the problem with your advice. I'm not sure if this is considered a bug- the issue was that I had my git.exe path surrounded by quotes:
I instinctively put quotes around the path to |
Thanks a lot for this information! Now it appears clear the issue is with the usage of the respective shell. There must be a way to prevent word splitting when setting variables, other than surrounding it with quotes which would work in bash, for instance.
|
ImportError: Failed to initialize: Bad git executable. All git commands will error until this is rectified. This initial warning can be silenced or aggravated in the future by setting the Example: |
how to solve this problem? |
@sauravk0302 Without any additional information, nothing can be said that isn't already written in this issue. |
@sauravk0302 Hi just type |
works for me, thanks。 |
This worked for me |
ImportError: Failed to initialize: Bad git executable. set GIT_PYTHON_REFRESH=quiet still facing same Import error. Here's the code: from pydriller import Repository for commit in Repository("https://github.com/apache/skywalking.git").traverse_commits(): |
good |
(plane) D:\PlanarReconstruction-master>python main.py train with dataset.root_dir=D:/PlanarReconstruction-master/data_tools/save/processd/data **i'm very much a beginner,so could someone tell me how to fix it? my enviroment is just like the README said ** |
good work |
Along with export PATH=$PATH:/usr/bin/git
export GIT_PYTHON_GIT_EXECUTABLE=/usr/bin/git
export GIT_SSH_COMMAND="/usr/bin/ssh -i ~/.ssh/id_rsa" |
In Linux, |
That's work for me too :) |
OS - Win 2012 R2
Python - 2.7.13
git - version 2.20.1.windows.1
GitPython - 2.1.11
GitPython not finding my
git.exe
binary?C:\Program Files (x86)\Git\cmd
is in my PATH. I then explicitly setGIT_PYTHON_GIT_EXECUTABLE
as #26 recommends.The text was updated successfully, but these errors were encountered: