How to solve “Unable to find git in your PATH” on Flutter?

爷,独闯天下 提交于 2020-06-25 09:41:11

问题


I've just tried to install Flutter on Linux and when I try to run a flutter command (flutter doctor), I'm getting

Error: Unable to find git in your PATH.

Anyone who knows how to solve this?


回答1:


Install it using following command.

sudo apt-get install git




回答2:


Add

C:\Program Files\Git\bin\git.exe;C:\Program Files\Git\cmd;C:\Windows\System32 

to your PATH variable

Do not create new variable for git but add them as I did one after another separating them by ;




回答3:


[ASSUMING GIT IS INSTALLED CORRECTLY] I have documented the bug at "https://github.com/flutter/flutter/issues/39785", it's a simple change to the batch file.




回答4:


I had the same problem on Windows 10. I've tried evertyhing but running cmd as Administrator solved my problem. This may be helpful for others.



来源:https://stackoverflow.com/questions/51263438/how-to-solve-unable-to-find-git-in-your-path-on-flutter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!