You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error: Unable to find git in your PATH. on Windows 11 #159018
I'm having the same problem.
I also tried adding all folders as safe directories in the git config as follows: git config --global --add safe.directory '*'
Yet, the error remains present.
Maybe that helps.
I'm having the same problem. I also tried adding all folders as safe directories in the git config as follows: git config --global --add safe.directory '*' Yet, the error remains present. Maybe that helps.
I also tried that to no avail. I even ran the command and restarted just for the heck of it and it still does it.
I even tried it without the ‘’.
git config --global --add safe.directory *
I am starting to think this has nothing to do with git but instead flutter not being able to spit out a more specific error message.
I already gave up after hours and days wasted and what stinks is I wanted to start learning flutter because the dev community says its much a better dev experience than react native but now I am about to just forget flutter and jump on the react bandwagon
Hey I managed to resolved it.
I found the solution in this stack overflow response: stack overflow Hope it helps.
It seems to be a very weird error involving the folder in which the cmd opens.
Hey I managed to resolved it. I found the solution in this stack overflow response: stack overflow Hope it helps. It seems to be a very weird error involving the folder in which the cmd opens.
Bless you! I tried everything but that solution and it worked!
So basically the command processor can't have any AutoRun key registered in windows. I had one because usually I like the command prompt to be inside the current project folder I'm working on and not have to type "cd C:\project\current_project" everytime when opening.
I wonder if flutter can fix this so people with a autorun key in their windows registry can still run smoothly.
Me too, spent hours trying everything, bless the guy that found the solution too. You're welcome, btw haha. I hope that they can fix that as well, I also like the AutoRun key.
I don't encounter this issue on my Windows 11. I just saw @atang08's response at #156922 (comment) with the required information (sorry somehow I missed it), so I quote it here for further insight as that issue has been closed by OP:
I have git installed and running where git shows:
C:\flutter\bin\mingit\mingw64\bin\git.exe
Running where flutter:
[C:\flutter\bin\flutter
C:\flutter\bin\flutter.bat]
@cesarsiuu2316: Thank you for sharing SO answer, that may be helpful to investigate this.
Thanks for the details everyone, that's very helpful! Were you all able to fix the issue by clearing Computer\HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor or Computer\ HKEY_CURRENT_USER\Software\Microsoft\Command Processor?
If so, I think this should be a relatively simple fix if we just immediately change the current directory in the script to the directory the flutter.bat script lives as soon as it's invoked and before running any commands.
In my case @bkonyi , I was able to fix the issue by clearing Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor.
Hope this helps, thanks for the follow up.
In my case @bkonyi , I was able to fix the issue by clearing Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor. Hope this helps, thanks for the follow up.
Yep, this is super helpful! I should have a fix for this in #159424.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
cesarsiuu2316 commentedon Nov 17, 2024
I'm having the same problem.
I also tried adding all folders as safe directories in the git config as follows:
git config --global --add safe.directory '*'Yet, the error remains present.
Maybe that helps.
atang08 commentedon Nov 17, 2024
I also tried that to no avail. I even ran the command and restarted just for the heck of it and it still does it.
I even tried it without the ‘’.
git config --global --add safe.directory *I am starting to think this has nothing to do with git but instead flutter not being able to spit out a more specific error message.
I already gave up after hours and days wasted and what stinks is I wanted to start learning flutter because the dev community says its much a better dev experience than react native but now I am about to just forget flutter and jump on the react bandwagon
cesarsiuu2316 commentedon Nov 17, 2024
Hey I managed to resolved it.
I found the solution in this stack overflow response: stack overflow Hope it helps.
It seems to be a very weird error involving the folder in which the cmd opens.
atang08 commentedon Nov 17, 2024
Bless you! I tried everything but that solution and it worked!
So basically the command processor can't have any AutoRun key registered in windows. I had one because usually I like the command prompt to be inside the current project folder I'm working on and not have to type "cd C:\project\current_project" everytime when opening.
I wonder if flutter can fix this so people with a autorun key in their windows registry can still run smoothly.
cesarsiuu2316 commentedon Nov 17, 2024
Me too, spent hours trying everything, bless the guy that found the solution too. You're welcome, btw haha. I hope that they can fix that as well, I also like the AutoRun key.
huycozy commentedon Nov 18, 2024
huycozy commentedon Nov 18, 2024
I don't encounter this issue on my Windows 11. I just saw @atang08's response at #156922 (comment) with the required information (sorry somehow I missed it), so I quote it here for further insight as that issue has been closed by OP:
@cesarsiuu2316: Thank you for sharing SO answer, that may be helpful to investigate this.
bkonyi commentedon Nov 18, 2024
Thanks for the details everyone, that's very helpful! Were you all able to fix the issue by clearing
Computer\HKEY_LOCAL_MACHINE\Software\Microsoft\Command ProcessororComputer\ HKEY_CURRENT_USER\Software\Microsoft\Command Processor?If so, I think this should be a relatively simple fix if we just immediately change the current directory in the script to the directory the
flutter.batscript lives as soon as it's invoked and before running any commands.cesarsiuu2316 commentedon Nov 24, 2024
In my case @bkonyi , I was able to fix the issue by clearing
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor.Hope this helps, thanks for the follow up.
[ Tool ] Fix "Error: Unable to find git in your PATH" when Command Pr…
bkonyi commentedon Nov 25, 2024
Yep, this is super helpful! I should have a fix for this in #159424.
[ Tool ] Fix "Error: Unable to find git in your PATH" when Command Pr…
github-actions commentedon Dec 17, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.