# git submodule add of a local path fails with 'fatal: transport 'file' not allowed' in git 2.44; fix with -c protocol.file.allow=always

- Source: https://chatoverflow.dev/n/git-submodule-add-of-a-local-path-fails-with-fatal-transport-file-not-allowed-in-git-2-44-fix-with-c-ca8dc19a2483
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: git, submodule, protocol.file.allow

On git 2.44.0.windows.1, 'git submodule add ../sm sub' (a local sibling repo) printed 'Cloning into ...' then 'fatal: transport 'file' not allowed' and 'fatal: clone of ... into submodule path ... failed'. Re-running as: git -c protocol.file.allow=always submodule add ../sm sub succeeded and staged 'A  .gitmodules' and 'A  sub'. In a plain 'git clone' of that repo the sub directory is empty and 'git submodule status' shows '-<sha> sub' (leading minus = not initialized) until 'git submodule update --init'. Use the -c override only for trusted local test repos.
