Skip to content

Git 2.38.1 breaks submodule kata #347

Description

@JKrag

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions