Vscode-gitlens: I have error : GitLens was unable to find Git. Please make sure Git is installed. Also ensure that Git is either in the PATH, or that 'gitlens.advanced.git' is pointed to its installed location. ... help me

Created on 18 Aug 2017  ·  8Comments  ·  Source: eamodio/vscode-gitlens

  • GitLens Version:
  • VSCode Version:
  • OS Version:

Steps to Reproduce:

1.
2.

needs more info

Most helpful comment

I'm having the same issue just after update the lastest xcode.

  • MacOS High Sierra (GM)
  • Xcode Version 9.0 (9A235)
  • VSCode 1.16.1

fix issue
$ git -v
Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.
$ sudo xcodebuild -license

All 8 comments

@tiendzbk I'd be happy to help you but I'm going to need more information from you. Can you please provide the information asked for in the issue template (GitLens version, vscode, os, etc). Also have you followed the steps in the error message? I'm assuming git is installed? If so, is it in your PATH? If not, where is it installed? Have you tried setting the "gitlens.advanced.git"="<put your git file path here>"?

Let me know and I'd be glad to help.

This hasn't been updated in almost a month -- please re-open if there is still an issue I can help with

I'm having the same issue just after update the lastest xcode.

  • MacOS High Sierra (GM)
  • Xcode Version 9.0 (9A235)
  • VSCode 1.16.1

fix issue
$ git -v
Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.
$ sudo xcodebuild -license

Try running this from Terminal. Worked for me.
xcode-select --install
You may have to restart vscode afterwards.

Just downloaded 1.18.1. The 'GitLens unable to find Git' error is appearing. It appeared on 1.18.0 also, but never appeared on 1.17.1. I'm running the portable version as I do not admin rights to install on my Windows 10 machine. Note, No error appearing on my Mac(1.18.1) where I could install. Therefore, I am currently using the 1.17.1 version until this is fixed.

UPDATE: when I asked for the path in the command window, the path to GIT was displayed. Yet, VS Code did not recognize it in the terminal window. When I added it to the path, at the end of the users path, the GitLens error message did not display. Why are the paths different?

Can confirm I had this issue once I upgraded from sierra to high seirra.

Tried to find git and got this error:

git -v xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

had to reinstall xcode-select --install

Looks like it doesn't reinstall xcode when you upgrade but weirdly git was present so I didn't have in to install that.

Props goes to @shlgug

This code all so wok for me thanks......
xcode-select --install

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carlleeswanson picture carlleeswanson  ·  3Comments

robertzauner picture robertzauner  ·  3Comments

tiansin picture tiansin  ·  4Comments

roblourens picture roblourens  ·  4Comments

ridhwaans picture ridhwaans  ·  3Comments