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

后端 未结 20 2383
有刺的猬
有刺的猬 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:45

    sudo xcode-select --reset in the terminal instantly solved the problem for me.

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

    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

    It works for me.

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

    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! :)

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

    When I installed MacOS Sierra I ran xcode-select --install and it worked fine

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

    I my case I've changed the name of Xcode app to Xcode9 and renamed later to Xcode.

    I needed to update my Xcode.app path.

    After typing sudo xcode-select --switch /Applications/Xcode.app on terminal everything worked fine again

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

    Download git from https://git-scm.com after download install it and then in terminal type which git you will get git path

    Satishs-MacBook-Air:~ Pathuri$ which git

    /usr/local/bin/git

    Satishs-MacBook-Air:~ Pathuri$

    click on apply and fit it on the pop up it will solve .

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