Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIndows: "Unable to find git in your PATH." if terminal is not in admin mode #123995

Closed
2 tasks done
badrulconfido opened this issue Apr 3, 2023 · 4 comments
Closed
2 tasks done
Labels
r: solved Issue is closed as solved

Comments

@badrulconfido
Copy link

Is there an existing issue for this?

Steps to reproduce

  1. Follow all steps to install Flutter on WIndows, including installing Git before hand
  2. Make sure that git works if you type it into Powershell as a regular user. If not put the git /cmd folder into your Windows PATH
  3. Open up Power shell as a regular / non-admin user then type flutter doctor -v
    Causes an error.

Not try opening in Admin mode and doing the same - it should work this time.

Actual results

Error: Unable to find git in your PATH.

Logs

Logs
<!-- Paste your logs here -->

Flutter Doctor output

Error: Unable to find git in your PATH.

@darshankawar darshankawar added the in triage Presently being triaged by the triage team label Apr 3, 2023
@darshankawar
Copy link
Member

@badrulconfido
Check this issue and underlying comments and see if it helps in your case.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 3, 2023
@badrulconfido
Copy link
Author

badrulconfido commented Apr 3, 2023

Afraid that did not solve the issue. So the link suggested "You can't use a git-pulled SDK and must use a download SDK .zip".
However my flutter sdk came from the .zip file and not a git pull.

One comment mentions checking out another link which in turn suggests that git report may be marked as unsafe which in turn leads you to another link which tells you to try the following but neither of these worked:

git config --global --add safe.directory C:\Users\badrulxxx\flutter\.git
git config --global --add safe.directory C:\Users\badrulxxx\flutter\

EDIT:

Ok I have managed to resolve it. I saw a comment at the bottom of this page, that suggested marking all your repos as 'safe' via
git config --global --add safe.directory '*'

Not sure what the implication of doing so is but I went ahead and did it and now things are working properly!

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Apr 3, 2023
@darshankawar
Copy link
Member

Good to know your issue is resolved. Closing as such.

@darshankawar darshankawar added r: solved Issue is closed as solved and removed in triage Presently being triaged by the triage team labels Apr 4, 2023
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: solved Issue is closed as solved
Projects
None yet
Development

No branches or pull requests

2 participants