Closed Nicolas-Innocent closed 4 months ago
Thanks for reporting!
This isn't the first time I hear that GB can't find Git in the PATH
. Can it be about the way Git is installed. I remember there were options whether or not to put it into the path.
Do you have git.exe available in a normal windows cmd.exe
prompt?
I am pretty sure that the PATH
that GB sees isn't including the git.exe
binary, and if so, it should be possible to check which PATH
is set in a terminal where git
works, compared to the system PATH
.
Is this something you can investigate?
Hi Byron,
Progress. sort of, so git bash existed in my $PATH, but not to the bin folder where git.exe lives. the element I had in the path was the git bash root, where git-cmd.exe is located. I had checked earlier, but seing the entry, didn't check it was correct. Added the correct path, and it now passes that, but fails with
Interestingly, it did push to github (abeit without the ssh signature), but did not propose to me creating the PR. Did that on github, updated the workspace, and it synced correctly (but VERY SLOWLY, and yes, hunk algo was enabled)
did another push for testing (one line of code) and got the same error (over 30s to prepare the push, which take maybe 3-4 sec on this project via the gitbutler on my arch box (obviously I'm not lauching both at the same time))
note that those error don't appear in the log as is
Thanks for sharing this valuable insight! I had a feeling that the PATH doesn't actually contain the binary itself.
As for the sluggish push performance, that's still puzzling me, and so is that the no elements in sequence
doesn't show up in the logs. Maybe the frontend can also show frontend errors there, and that's what's happening when there is an unexpected response? When searching for it, it appears in frontend code close to EmptyError
.
In any case, it's strange there is no error in the logs. The only time I noticed this happening is when something panics (i.e. a hard crash), which only shows up on stdout when using the development version directly.
Maybe this is something you could try, even though it's quite involved on Windows.
And I just realize that on Windows, GitButler could be smarter and see if bash.exe
is in the PATH
- from there it would be able to figure out the path of git.exe
by invoking bash. There is probably a lot of people who didn't put git.exe
into the path.
Lastly, all of this would be resolved if there was no dependency to git.exe
at all and everything could be done directly from within GitButler.
GitButler.log.2024-06-24.txt here is the full log of today's test. not a single occurence of the string error or elements in there
the path pointed to a floder containing git-bash.exe and git-cmd.exe. the real git.exe is in a bin subfolder along with bash.exe and sh.exe
I am investigating this.
It's interesting that the default wants to put git.exe
into the PATH, but ideally GitButler can handle the bash-only installation as well.
It turns out that unfortunately, when the first option is chosen, the PATH
is entirely unaltered, and looks like this on a fresh installation: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\byron\AppData\Local\Microsoft\WindowsApps;
With that it's not possible to find conclude from bash.exe
to the Git binary. However, I think it can still be an improvement if some standard installation directories would be tried.
The fix will be available in the Nightly build starting tomorrow, at the latest.
Version
0.12.5
Operating System
Windows
Distribution Method
msi (Windows)
Describe the issue
me again xD
trying to push from win11 fails with backend error: failed to execute git command: program not found i have git installed on windows through git-bash (v 2.34.0.windows.1) vscode recognizes it natively (and gitbutler works locally otherwise, appart from the earlier issue (#4135) about network repo, only bugs with some remote stuff)
tried with code signing disabled as well, and force-push (just in case), no changes. the doc here https://docs.gitbutler.com/troubleshooting/fetch-push says to check the auth method, I do have that option on arch, but not in windows
How to reproduce
No response
Expected behavior
No response
Relevant log output