0

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?

AsiPanda
  • 31
  • 7
  • Have you tried to create a private repo on GitHub btw? AFAIK, they added the ability to create some for free users recently. Or is not an option? – extempl Feb 28 '19 at 19:21
  • You pass creds on the comand line, no? https://stackoverflow.com/q/30202642/1531971 –  Feb 28 '19 at 19:27
  • No I have my login details in windows credential manager. Also I should point out that both of these repositories are private so both of them need authentication. I also have a different github login from the one on gitlab. – AsiPanda Feb 28 '19 at 21:24

1 Answers1

1

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.

AsiPanda
  • 31
  • 7