android studio 的 git.exe 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43573340/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
git.exe error for android studio
提问by UDIT PATEL
Recently I am trying to connect git hub repository to android studio but it shows following the error:
最近我试图将 git hub 存储库连接到 android studio,但它显示以下错误:
采纳答案by ajay.kumar
get a git path from your pc
从你的电脑获取一个 git 路径
go to my computer >open c:drive > Users>YourUser>Appdata>Local>Github>PortableGit_\cmd\git.exe
转到我的电脑>打开 c:drive > 用户>你的用户>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
然后复制文件位置并将其粘贴到 android studio 中的 git 可执行路径中,如上图所示
回答by Mukesh M
回答by Samson Muwanguzi
For my case git.exe was in the Path C:\Users\Username\ AppData\Local\GitHubDesktop\app-<appversion>\resources\app\git\cmd\git.exe
对于我的情况 git.exe 位于路径 C:\Users\Username\AppData\Local\GitHubDesktop\app-<appversion>\resources\app\git\cmd\git.exe
回答by Tamim Attafi
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
我在 Linux 上遇到了同样的错误,并在两天内寻找解决方案!然后有一天试图解决这个问题,偶然地,我清除了android studio和Voilà中指定的路径!Android studio 自动检测到我的git
(脸掌)!有趣的是,它不是我指向的路径 ( bin/usr/git
),也不是which git
命令返回的路径(相同路径),而是/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
!
对于intellij idea 和JetBrains 的其他产品是完全一样的问题,只是两者检测到的路径不同!Intellij 的想法指向了/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.
对于即使git
已安装并且 android studio 指向其路径的人仍然遇到此错误,请转到Settings
-> Version Control
->Git
并删除带有标签的文本框中的所有内容Path to Git executable
、您的 android studio 或您正在使用的任何 JetBrains 产品,会自动检测。