Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OS X - Can't start Git: /usr/bin/git Probably the path to Git executable is not valid

People also ask

How to get path to git executable mac?

2 Answers. Git executable can be found by using running git --exec-path, which usually lives in the Git execution path. git --exec-path will give you the path.

What is Jenkins path to git executable?

For Jenkins version 2.121.3, Go to Manage jenkins -> Global tool configuration -> Git installations -> Path to Git executable: C:\Program Files\Git\bin\git.exe.


You should run sudo git --version on your command line. It will ask you to agree to the git xcode license agreement, once done everything will work as before.


When upgrading to MacOS Sierra I had to run: xcode-select --install


You should agree explicitly to user's licence agreement.

This is how you should do it:

  1. Open terminal
  2. run the following command: sudo xcodebuild -license
  3. agree to the terms.

That's it! :)


I got this problem too, because I uninstalled my Xcode.

I solved it with these steps:

  1. Type xcode-select --install in the terminal (Installs the license)

  2. Download a git and re-install it

After this 2 steps, I can use git commands in the terminal like git or git --version.

But when I open the android studio, it still show the error

so we need another two steps:

  1. Type which git in your terminal (find out the git path)

  2. Configure the path (you got in the step 3) in your android studio , then apply

Just like below pic enter image description here

It works for me.


use "which git" in terminal. It will provide you your git location. like "/usr/local/bin/git" paste this location in popup which came after clicking "Fix it". Then click apply.