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

Incompatible with git 2.36.0 #2905

Closed
tjcutajar opened this issue Apr 20, 2022 · 9 comments · Fixed by #2940 or #2997
Closed

Incompatible with git 2.36.0 #2905

tjcutajar opened this issue Apr 20, 2022 · 9 comments · Fixed by #2940 or #2997
Assignees

Comments

@tjcutajar
Copy link

Bug

upgrading to git 2.36.0 causes garden to error.

Current Behavior

commands raise
Path /Users/myUser/.garden/bin/static/kubernetes/system is not in a git repository root. Garden must be run from within a git repo. Please run 'git init' if you're starting a new project and repository, or move the project to an existing repository, and try again.

Your environment

  • OS: MacOS 12.3.1

garden version 0.12.39

@Orzelius
Copy link
Contributor

what command are you running and are you running it within a git repository?

@tjcutajar
Copy link
Author

running either deploy or delete from within a git repo. Downgrading git to 2.35.3 resolves it.

@twelvemo
Copy link
Collaborator

Hello @tjcutajar , thanks for flagging the issue. I am having a hard time reproducing it. I just upgraded to git 2.36.0 and ran garden deploy without any issues. I am also on MacOS. Can you give me any additional infos to reproduce?

@tjcutajar
Copy link
Author

@twelvemo maybe try deleting your .garden directory

@alexkuretz
Copy link

alexkuretz commented May 3, 2022

We are getting this on Windows as well while trying to set up a new system. My coworker getting the error is using git 2.36.0 and my setup with git 2.35.1 does not show the error. We are running within our git repository.

Failed resolving provider kubernetes. Here is the output:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Path C:\Users\username\.garden\bin\static\kubernetes\system is not in a git repository root. Garden must be run from within a git repo. Please run git init if you're starting a new project and repository, or move the project to an existing repository, and try again.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Failed resolving one or more providers:

  • kubernetes

@alexkuretz
Copy link

Another coworker encountered this today and found that by going into the .garden\bin\static\kubernetes\system directory and doing a 'git status' he was able to set a permission that allowed garden to work. I believe it's related to the "Stricter repository ownership checks" change in git 2.36:
https://github.blog/2022-04-18-highlights-from-git-2-36/

@edvald
Copy link
Collaborator

edvald commented May 3, 2022

Thanks for the investigation @alexkuretz! I figure it's a simple fix, we'll get on it.

@ITHedgeHog
Copy link
Contributor

I got around this by running the command git config --add safe.directory C:\git\oemplatform which is the project root for me, this got me running.

@vvagaytsev
Copy link
Collaborator

The fix is available in the edge release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants