I feel like I’ve been at this on and off for a while now.
there just isn’t any support in git for adding submodules that are on the local drive.
that is what I thought, but I was wrong. the submodules are just impossible to use.
I am using them to get local python packages available.
I’ve tried several suggestions without luck.
for reference I’m in a repo called islandpk and I need the yoken package available
to me in ‘src/yoken’.
Here is what I’ve tried:
<code>git submodule add /Users/hecate/Applications/persephone-python-pac/src/yoken ./src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/hecate/Applications/persephone-python-pac/src/yoken' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
<code>git submodule add /Users/hecate/Applications/persephone-python-pac/src/yoken ./src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/hecate/Applications/persephone-python-pac/src/yoken' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
</code>
git submodule add /Users/hecate/Applications/persephone-python-pac/src/yoken ./src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/hecate/Applications/persephone-python-pac/src/yoken' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
I know that git has trouble with protocol so I tried with ‘file://’.
<code>git submodule add file:///Users/hecate/Applications/persephone-python-pac/src/yoken ./src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of 'file:///Users/hecate/Applications/persephone-python-pac/src/yoken' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
<code>git submodule add file:///Users/hecate/Applications/persephone-python-pac/src/yoken ./src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of 'file:///Users/hecate/Applications/persephone-python-pac/src/yoken' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
</code>
git submodule add file:///Users/hecate/Applications/persephone-python-pac/src/yoken ./src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of 'file:///Users/hecate/Applications/persephone-python-pac/src/yoken' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
next I tried using a relative path:
<code>git submodule add ../persephone-python-pac/src/yoken src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/hecate/Applications/persephone-python-pac/src/yoken' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
<code>git submodule add ../persephone-python-pac/src/yoken src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/hecate/Applications/persephone-python-pac/src/yoken' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
</code>
git submodule add ../persephone-python-pac/src/yoken src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/hecate/Applications/persephone-python-pac/src/yoken' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
these are working tree repos that I’ve tried, so
I saved a bare version:
➜ islandpk git:(main)git submodule add file:///Users/hecate/.git-repos/yoken/ src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of 'file:///Users/hecate/.git-repos/yoken/' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
➜ islandpk git:(main)git submodule add /Users/hecate/.git-repos/yoken/ src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/hecate/.git-repos/yoken/' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
➜ islandpk git:(main)git submodule add -- /Users/hecate/.git-repos/yoken/ src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/hecate/.git-repos/yoken/' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
<code>
➜ islandpk git:(main)git submodule add file:///Users/hecate/.git-repos/yoken/ src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of 'file:///Users/hecate/.git-repos/yoken/' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
➜ islandpk git:(main)git submodule add /Users/hecate/.git-repos/yoken/ src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/hecate/.git-repos/yoken/' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
➜ islandpk git:(main)git submodule add -- /Users/hecate/.git-repos/yoken/ src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/hecate/.git-repos/yoken/' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
</code>
➜ islandpk git:(main)git submodule add file:///Users/hecate/.git-repos/yoken/ src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of 'file:///Users/hecate/.git-repos/yoken/' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
➜ islandpk git:(main)git submodule add /Users/hecate/.git-repos/yoken/ src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/hecate/.git-repos/yoken/' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
➜ islandpk git:(main)git submodule add -- /Users/hecate/.git-repos/yoken/ src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
fatal: transport 'file' not allowed
fatal: clone of '/Users/hecate/.git-repos/yoken/' into submodule path '/Users/hecate/Applications/islandpk/src/yoken' failed
I thought that if I pushed to a
remote over ssh i would work better:
<code>git submodule add ssh://xxxx:/home/rand_usr/.git-repos/yoken ./src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
[email protected]'s password:
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 7 (delta 1), reused 0 (delta 0)
Receiving objects: 100% (7/7), done.
Resolving deltas: 100% (1/1), done.
fatal: You are on a branch yet to be born
fatal: unable to checkout submodule 'src/yoken'
<code>git submodule add ssh://xxxx:/home/rand_usr/.git-repos/yoken ./src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
[email protected]'s password:
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 7 (delta 1), reused 0 (delta 0)
Receiving objects: 100% (7/7), done.
Resolving deltas: 100% (1/1), done.
fatal: You are on a branch yet to be born
fatal: unable to checkout submodule 'src/yoken'
</code>
git submodule add ssh://xxxx:/home/rand_usr/.git-repos/yoken ./src/yoken
Cloning into '/Users/hecate/Applications/islandpk/src/yoken'...
[email protected]'s password:
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 7 (delta 1), reused 0 (delta 0)
Receiving objects: 100% (7/7), done.
Resolving deltas: 100% (1/1), done.
fatal: You are on a branch yet to be born
fatal: unable to checkout submodule 'src/yoken'
so I’m out of juice on this one