我在网络驱动器上有一个 git 远程存储库,尝试使用以下命令将此存储库克隆到 Mac 计算机:
\ngit clone --rescurse-submodules /Volumes/path/to/repository.\nRun Code Online (Sandbox Code Playgroud)\n主存储库克隆得很好,但对于所有子模块,我收到如下消息:
\nTransmission type 'file' not allowed\nRun Code Online (Sandbox Code Playgroud)\n(德语原文是\xc3\x9cbertragungsart 'file' nicht erlaubt)。
子模块文件夹保持为空。
\n子模块的路径看起来不错,所以我不认为这是与路径相关的错误。\nWindows 计算机上的相同操作运行良好。
\nvin*_*zee 17
transport 'file' not allowed
Run Code Online (Sandbox Code Playgroud)
要解决这个问题,请运行:
transport 'file' not allowed
Run Code Online (Sandbox Code Playgroud)
或者
git -c protocol.file.allow=always clone --recurse-submodules /Volumes/path/to/repository
Run Code Online (Sandbox Code Playgroud)
请参阅https://git-scm.com/docs/git-config#Documentation/git-config.txt-protocolallow。