I am trying to clone a github repository in a CI environment (specifically Gitlab CI) which contains submodules to other private github repositories. So the github repository I try to clone has the structure:
repo1
|
-> repo2
|
-> repo3
Here repo2 and repo 3 are submodules of repo1. Let's assume the address of the repos are https://github.com/user/[repo1|repo2|repo3].git. In my Ci script I call the command git clone --recurse-submodules https://<AcessToken>@github.com/user/repo1.git <Some/Path>to clone the repository. Without the submodules, this works fine. With the submodules I get the following error:
[git]: fatal: could not read Username for 'https://github.com': No such device or address
What is the best approach here to authenticate while cloning the submodules?