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

Git 2.38.1 breaks submodule kata #347

Open
JKrag opened this issue Oct 26, 2022 · 0 comments
Open

Git 2.38.1 breaks submodule kata #347

JKrag opened this issue Oct 26, 2022 · 0 comments
Labels

Comments

@JKrag
Copy link
Contributor

JKrag commented Oct 26, 2022

2.38.1 introduces a change (due to CVE-2022-39253) that disables git submodule add using the file protocol.

➜  product git:(master) git submodule add ../remote
Cloning into '/Users/.../git-katas/submodules/exercise/product/remote'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/.../git-katas/submodules/exercise/remote' into submodule path '/Users/.../git-katas/submodules/exercise/product/remote' failed

Apparently this can be alleviated by setting git config --global protocol.file.allow always.
Unfortunately this can not be solved with a --local setting as that only applies to the parent repo, not the submodule.

I would prefer not to have the setup.sh script mess with users global config, especially regarding something security related, but we need a solution.

Using git -c protocol.file.allow=always submodule add ../remote works, but is not a nice command to have to explain in a kata.

@JKrag JKrag added the bug label Oct 26, 2022
JKrag added a commit that referenced this issue Apr 26, 2024
As mentioned in #347, there is a new restriction in Git since 2.38.1 which means that we can only run this kata by temporarily loosening the security restrictions.

Until we find a better solution, this at least adds a note with instructions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant