AsiPanda
AsiPanda

Reputation: 41

Private GitLab repository as a GitHub repository submodule

I am trying to add a GitLab repository as a GitHub repository submodule, so that when I clone the GitHub repo, I will clone the GitLab repo as well. I have already set up the submodule and it appears that all is working, however when cloning I am unable to get the submodule no matter what I do.

The GitLab repository is on a private GitLab server so I will need to log in, but there appears to be no error or message whatsoever.

I have tried git submodule sync --recursive as well as git submodule update --recursive, git submodule update --init --recursive and git submodule update --recursive --remote.

Is this impossible or am I just doing something terribly wrong?

Upvotes: 0

Views: 2690

Answers (1)

AsiPanda
AsiPanda

Reputation: 41

Okay I figured it out, I have added the submodule, but somehow git messed up and since there were some capital letters in the directory name, but git added the path with small letters it couldn't find the path to that submodule.

After fixing that in .gitmodules I was able to push and then clone recursively with the submodule as well.

Upvotes: 1

Related Questions