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
"Git: Failed to execute git" dialog but git works in terminal #58910
Comments
(Experimental duplicate detection)
|
Also would add that --verbose gave no clue on problems. I think we just need to get at exactly what is failing in the git call... I believe this is an edge case related to something about my workstation's configuration - environment, path, permissions. I am suspicious that VSCode is internally executing git in a way that is not the same as is happening in terminal. |
Can you reproduce in other git repositories in your system?
This line specifically is strange. It's expected to see an absolute path over there. |
At the time this occurred I had two projects under git control and both broke. I added a new project, and it broke too. As a sanity check, I opened one of the projects in the Netbeans IDE and it correctly integrated with git, showing project status, current branch, and allowing me to diff a changed file in the IDE. So I think git and the git repo are fine. |
Probably TMI, but I had been having problems installing Microsoft OS updates for some time (computer appeared to be hung after install and I rolled back updates). Today, I let the update process run in its hung state for several hours and the updates seem to have installed. I see a lot of MS Office updates have installed plus Windows OS updates KB4457044 and 4457144. Now GIT is working again in VS Code. VS Code GIT integration is now working again after 2 months. I can only conclude that the previously failed updates had left some aspect of my system in a strange state or the update process included a disk or os scan/repair that resolved the underlying issue. I will say that during this period, no other aspect of my system failed besides VS Code/GIT, which was certainly strange. I think this issue can be closed but might be useful as a reference in case others see the same thing. For sake of completeness, one other symptom I had noticed was that GIT GUI under Windows was also failing to launch - and that is resolved as well. As I had never used GIT GUI previously I assumed it had always been broken but now it seems related to the same root issue. Thanks for your time. |
No repository works, then? Are the repositories located in a special file system, eg remote? |
Joao, looks like we posted at the same time (see my comment above)... strangely a Windows system update solved the problem. To answer your last question though, all repositories were affected and they were in the local file system. So there is a strange dependency on some aspect of the OS. I'm going to close this issue. |
I have the same problem. Similar git log output; with no results to the command;
|
@mrkbutty, if you have the same problem I had, then GIT GUI will also fail to launch with an error. Solution on Win7 strangely came from a system update - see if the specific system updates I mentioned are applied on your machine perhaps. This is still a very odd problem so maybe @joaomoreno will want to work with you now that it's been seen again... |
@fischeme Yes it is strange as it was working a week or so ago. I also have similar problem in pycharm (which was also working fine a week ago). Pycharm says "Cannot run git: Empty git --version output". So I do think this is environmental. But I can run git fine in any console. I have seen a similar problem in the past when "Beyond Trust" service was stopping Docker from controlling VBox. It interfered which with spawning of the VBox CLI commands - stopping the service fixed it.
You wouldn't happen to know which update was applied do you? - My Win7 system seems up to date based on fixes released by my Organisation (I suspect we lag the most up to date fixes). I would be happy to work with @joaomoreno or anyone to fix this so I don't have to manually run Git at terminal. |
@mrkbutty Maybe try fully reinstalling Git and VS Code. |
Some more intrigue.... I created 2x scripts one in python another in go, below are the scripts and output.
|
@mrkbutty, see my post from Sep 19 for the OS updates that were done. Still not sure if it was the updates themselves or housekeeping as part of the update process (does the update process always do an OS scan and repair?) that did the trick for me. A whole bunch of other updates related to MS Office were also installed plus an update to .NET (KB44577035). I would focus first on making sure you have the Windows and NET updates then I can send you the long list of Office Updates that were done but would be surprised if those mattered. |
@fischeme yes I have the same issue with gitgui. But I also have all those updates already installed. |
I have the same issue since around August. The git command is running fine from the cmd shell. But not for the VScode. I am using the git from cmder. This is the git window output
@mrkbutty, I have the same output as your go program. No output of the go program. Funny enough, I also have the Carbon Black installed around August time frame... I have no choice now to work the git stuff from command line... Please share any update on this issue. |
The plot thickens... I also got Carbon Black in August, exactly when my problems began. But then they resolved.... I have version 3.2.1.51 of "Cb Defense Sensor 64-bit". Maybe I got an update? I'm going to reopen this as it seems to be an interaction that the MS team will want to dig into some more... Here there is some discussion about dependence on vendor patches and weirdness about if/when a registry key should be pushed... https://www.carbonblack.com/2018/01/05/carbon-black-solutions-currently-compatible-major-os-vendor-patches-meltdown-spectre/ |
Reopening due to multiple instances of this now and better information on possible root cause... |
Sorry @joaomoreno , as you may recall, the issue resolved itself on my system after a Windows update in mid September, so I cannot recreate what I saw starting in mid August. But when I had the problem, it impacted every git repo I tried, including a new one I created. Those same git repos worked fine with another IDE (NetBeans). I previously provided the two OS updates that were applied at the time the problem resolved, but it seems other users already had those so perhaps they are not what did the trick. you might be better working with the others because they both seem to still have the problem. |
@fischeme Do you still have the issue? |
I do not have the issue any longer (see: #58910 (comment)) |
Issue Type: Bug
As of approximately August, git integration no longer works, but git commands work fine from the terminal within VS Code.
I can reliably reproduce by opening a project folder with .git repository, clicking on source control tab in sidebar and pressing "Refresh" icon. VS Code then presents a dialog with "Git: Failed to execute git". From there, opening the git log shows a normal log, with a series of commands and no errors:
user.email and user.name are already set globally so this solution is not a problem.
Issue occurs on insider edition of VS code and it also occurs when running as administrator and when running with --disable-extensions.
VS Code version: Code 1.27.2 (f46c4c4, 2018-09-12T16:17:45.060Z)
OS version: Windows_NT x64 6.1.7601
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Extensions (3)
The text was updated successfully, but these errors were encountered: