14

In Intellij I'm receiving the error message that is in the title of this question: Cannot Run Git File Not Found: /usr/local/bin/git.

The file, however, does exist. I've tried selecting it in the configuration dialog, but without success.

The problem does not seem to be present in VS Code.

Anyone have an idea why this is happening?

3 Answers 3

23

You need to setup git properly, go to Settings, then File | Settings | Version Control | Git and edit Path to Git executable field. If you enter path to Git (which git in terminal) - usually /usr/bin/git and press Test it may popup a more informative message. Also check the rights of the git executable.

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks. Yes, I've gone through the Git configuration in preferences and selected the file that exists, but I still get the error. No more info. I should probably have included that Git has been working fine until last week. I was on vacation, so not sure if the problem coincides with updating Intellij a couple weeks ago.
What which git outputs in terminal?
/usr/bin/git. Interesting. I suppose I should point to that, then.
Yes! Sorry for not replying sooner! All good. I don't know why it was pointing to the wrong directory. Must have happened during last update.
chmod +rwx git works for making sure the git executable can run.
0

I have had a similar problem, with my intellij stating there was "no such file or directory" when setting up VCS for a project.

Would work when pressing test in the settings, showing the correct version.

Path was set to "usr/local/bin/git" I solved it by setting it to "/usr/local/bin/git"

Might not be relevant to this exact problem, but my search for a solution led me here, so just putting it for someone else.

Comments

-1

You need to set correct git executable as shown in the attached screen and it will be ok.

enter image description here

1 Comment

Since that executable does not exist for the OP, perhaps an explanation of how to find it and then add it to the settings in the attached screen?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.