Content-Length: 294745 | pFad | http://github.com/flutter/flutter/issues/123161

0E Git may fail on Windows because flutter repo is marked as unsafe · Issue #123161 · flutter/flutter · GitHub
Skip to content

Git may fail on Windows because flutter repo is marked as unsafe #123161

@jubnl

Description

@jubnl

Is there an existing issue for this?

Steps to reproduce

On Windows 10 with git previously installed :

  1. Download flutter and unzip it where you want (in my case C:\flutter)
  2. Add multiple environment variables (git, powershell, system32, flutter path, in my case C:\flutter) following cmd crash when using any flutter command #68820
  3. Open a new command prompt (cmd.exe) and try any flutter command. The command prompt will crash.

Actual results

The command prompt crashed instantly

Logs

Logs

I ran flutter in powershell and it gave me the following output :

PS C:\flutter> flutter
Error: Unable to find git in your PATH.

But then I checked that my git version :

PS C:\flutter> git --version
git version 2.40.0.windows.1

git and flutter are both in the path environment variable :

PS C:\flutter> where.exe flutter dart
C:\flutter\bin\flutter
C:\flutter\bin\flutter.bat
C:\flutter\bin\dart
C:\flutter\bin\dart.bat
PS C:\flutter> where.exe git
C:\Program Files\Git\cmd\git.exe
C:\Program Files\Git\bin\git.exe

I found a solution for that. You have to add the flutter base dir to the safe directory global config in git. (thanks to stackoverflow)

C:\flutter>git config --global --add safe.directory C:/flutter

The flutter command worked after that

PS C:\flutter> flutter
Manage your Flutter app development.

Common commands:
...

It would be great to add this directly to the installation documentation.

Flutter Doctor output

Not applicable

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listplatform-windowsBuilding on or for Windows specificallyteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/flutter/flutter/issues/123161

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy