git.exe error for android studio

前端 未结 5 1269
执笔经年
执笔经年 2021-01-05 01:25

Recently I am trying to connect git hub repository to android studio but it shows following the error:

\"Error

相关标签:
5条回答
  • 2021-01-05 02:02

    For my case git.exe was in the Path C:\Users\Username\ AppData\Local\GitHubDesktop\app-<appversion>\resources\app\git\cmd\git.exe

    0 讨论(0)
  • 2021-01-05 02:12

    Install Git if not already installed.

    In android studio click on File -> Settings -> Version control -> Git

    Then click to select Path to Git executable

    You should find your git.exe file in path: C:\Program Files\Git\cmd\git.exe

    0 讨论(0)
  • 2021-01-05 02:15

    get a git path from your pc

    go to my computer >open c:drive > Users>YourUser>Appdata>Local>Github>PortableGit_\cmd\git.exe

    then copy the file location and past it into your git executable path in android studio as shown in the above image

    0 讨论(0)
  • 2021-01-05 02:15

    Go to Settings-->Version Control-->Git and Fix Path to Git executable. Also click test button to check it is working.

    0 讨论(0)
  • 2021-01-05 02:16

    I know this might sound stupid but yes, it is as stupid as it is!

    I had this same error on Linux and was searching for a solution for two days! Then one day was trying to solve this, by chance, I cleared the path specified in android studio and Voilà! Android studio auto detected my git (facepalm)! And the interesting thing is it was not the path I was pointing to (bin/usr/git), and not the path returned by which git command (same path), it was /app/bin/git

    For intellij idea and other products of JetBrains is quite the same issue, but the path detected by the two is different! Intellij idea was pointiong to /usr/bin/git!

    For people still having this error even if their git is installed and android studio is pointing to its path, go to Settings -> Version Control -> Git and delete everything inside the text box with the label Path to Git executable, your android studio or what ever JetBrains product you're using, will auto-detect it.

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