I have a git remote repository on a network drive an try to clone this repository to a Mac Computer with:
git clone --rescurse-submodules /Volumes/path/to/repository.
The main repository is cloning fine but for all submodules I get a message like:
Transmission type 'file' not allowed
(original message in german is Übertragungsart 'file' nicht erlaubt
).
The submodule folders stay empty.
The path to the submodules seems fine so I don't think it is a path related error. The same operation on a Windows Machine is working fine.
The translation of your error message is:
transport 'file' not allowed
To solve it, run:
git config --global protocol.file.allow always
git clone --recurse-submodules /Volumes/path/to/repository
or
git -c protocol.file.allow=always clone --recurse-submodules /Volumes/path/to/repository
See https://git-scm.com/docs/git-config#Documentation/git-config.txt-protocolallow.
Thanks to grg's comment and phd's comment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With