Skip to content
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

Error: spawn git ENOENT #100

Closed
dapidmini opened this issue Mar 2, 2017 · 10 comments
Closed

Error: spawn git ENOENT #100

dapidmini opened this issue Mar 2, 2017 · 10 comments

Comments

@dapidmini
Copy link

I keep getting this error message: Error: spawn git ENOENT when I try to view git history log for a private repository that I'm contributing to.
image

P.S. I have git desktop and git shell already installed on my local computer because I've been using git desktop and notepad++ before this. I also have tried caching my git account credential as instructed here and restarted the computer but I'm still getting the same error.
image

@mikes-gh
Copy link
Contributor

mikes-gh commented Mar 7, 2017

Could you try updating to 0.2.0
It may not fix the issue but this version logs to the output window Git History Log which may give us more info.'

@lukaspechar
Copy link

Have the same problem. Any news of how to fix this?

@mikes-gh
Copy link
Contributor

mikes-gh commented Apr 5, 2017

This issue never progressed because we need more info.
Could you paste the contents of the Git History Log output window please

@lukaspechar
Copy link

Below is the response form my log. I'm on Windows 10. VSCode 1.11.0

[Info -09:09:03.638] git path: falling back to PATH environment variable [Info -09:09:03.638] git log --format="%n95E9659B-27DC-43C4-A717-D75969757EA5%nrefs=%d%ncommit=%H%ncommitAbbrev=%h%ntree=%T%ntreeAbbrev=%t%nparents=%P%nparentsAbbrev=%p%nauthor=%an <%ae> %at%ncommitter=%cn <%ce> %ct%nsubject=%s%nbody=%b%n%nnotes=%N%n95E9659B-27DC-43C4-A717-D75969757EA1%n" --date-order --decorate=full --skip=0 --max-count=50 --numstat -- [Error-09:09:03.638] Error: spawn git ENOENT

@mikes-gh
Copy link
Contributor

mikes-gh commented Apr 6, 2017

That would indicate we cant find git

Could you open a command window (not bash shell) and

  1. Could you paste the result of echo %PATH%
  2. Could you try git log

@lukaspechar
Copy link

Ok solved it! Thanks for the info. The error was not very clear so I couldn't figure it out. Git was not registered in the PATH variable. I would have thought installing GIT in VS Code would have done that. I installed Windows for GIT and switched my terminal to Command Prompt in VS Code. Thanks for your help!

@mikes-gh
Copy link
Contributor

mikes-gh commented Apr 6, 2017

OK I guess its not a clear error message.
We should check the path to make sure git is in there.
When you say installing GIT in vscode what do you mean?
Were you expecting vscode to intsall git for you? (it doesnt)

@lukaspechar
Copy link

lukaspechar commented Apr 6, 2017

Well, since there is embedded source control and it seems to be working well from the interface I would have thought VS Code would have already set it up as part of the default command prompt. However, I did notice Powershell seems to be the default in editor console. Not sure if Powershell uses the PATH variable. Nonetheless, thanks for you help. I'm glad I can use your extension now 👍

@x0zh
Copy link

x0zh commented Jul 27, 2017

I also get the error.
In the settings.json of vscode:

"git.path": "D:\\Git\\bin"

all git commands perform well in vscode terminal, except the extension.

when I change the configuration to "git.path": "D:\\Git\\bin\\git.exe", the error disappears.

@ghost
Copy link

ghost commented Nov 22, 2021

ENOENT: spawn git ENOENT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants