OS X - Can't start Git: /usr/bin/git Probably the path to Git executable is not valid
Solution 1:
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.
Solution 2:
When upgrading to MacOS Sierra I had to run: xcode-select --install
Solution 3:
You should agree explicitly to user's licence agreement.
This is how you should do it:
- Open terminal
- run the following command:
sudo xcodebuild -license
- agree to the terms.
That's it! :)
Solution 4:
I got this problem too, because I uninstalled my Xcode.
I solved it with these steps:
Type
xcode-select --install
in the terminal (Installs the license)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:
Type
which git
in your terminal (find out the git path)Configure the path (you got in the step 3) in your android studio , then apply
Just like below pic
It works for me.
Solution 5:
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.