skip to Main Content

Dart and flutter error Unable to find git in your PATH.
This problem is starting to bother me
When I order Flutter Doctor this error appears
In some cases, the error does not appear here, but it always appears when I write
dart pub global activate flutterfire_cli

It used to work before without any problems.

I checked environment variables I think it’s fine
But when the problem is solved with Flutter it is not solved with Dart

2

Answers


  1. Oh Boy, I had some hours of fun because of this one.

    First, make sure you have git installed, and the Path is correct.
    You should have a link to your <git_installation_path>bingit.exe and <git_installation_path>cmd, and another one to your Flutter direcctory, <Flutter_path>bin.

    If you still have issues launching Flutter commands from your terminal, or from a terminal in Visual Studio Code, you can try opening the folder of your project and running this command:

    git config --global safe.directory *
    

    You might need to restart your terminal or your VSC in order to the changes to take effect

    Login or Signup to reply.
  2. Thanks, the line

    git config --global safe.directory *
    

    did the trick for me!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search