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

后端 未结 20 2381
有刺的猬
有刺的猬 2020-12-12 23:16

I get this error in Android Studio:

Can\'t start Git: /usr/bin/git Probably the path to Git executable is not valid.

<
相关标签:
20条回答
  • 2020-12-12 23:38

    I had updated Xcode last night. I ran git as root via sudo in the terminal and then it said I have not agreed to the Xcode licence terms, and allowed me to view them and then agree in the terminal. I probably would have got the GUI version if I tried to open Xcode.

    0 讨论(0)
  • 2020-12-12 23:41

    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.

    0 讨论(0)
  • 2020-12-12 23:41

    Just run "/usr/local/bin/git" on terminal.

    0 讨论(0)
  • 2020-12-12 23:42

    I tried "/usr/local/bin/git" path and clicked "Test" button but was getting error.

    so I clicked on three dots besides Test button and jumped to the given path but there was no git executable present. So at below path I found git exec:

    /usr/local/git/bin/git

    I hope it helps.

    0 讨论(0)
  • 2020-12-12 23:43

    In my situation I used "which git" in terminal. It will provide me my git location like "/usr/local/bin/git" instead of "/usr/bin/git" I pasted this location in popup which came after clicking "Fix it". Then clicked apply and it works.

    0 讨论(0)
  • 2020-12-12 23:45

    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.

    0 讨论(0)
提交回复
热议问题