Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git clone --recurse-submodules throws error on MacOs: Transmission type 'file' not allowed

Tags:

git

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.

like image 567
exception Avatar asked Sep 12 '25 05:09

exception


1 Answers

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.

like image 199
vinzee Avatar answered Sep 14 '25 19:09

vinzee