Git Submodule is there an easy way?

I’m creating my first pipeline and I need to clone a repo with submodules so I clone using standard git integration and then I’m trying to use the plugin for submodule but the problem is that that plugin requires GITHUB_TOKEN and in my case, I’m working with gitlab and set that var to blank doesn’t work.

I’m wondering why official git-clone doesn’t have an option to update submodules as this is pretty straight forward. On the other hand, the git-submodule only work with github…

So I have authenticated Gitlab for clone but I need to reinvent the wheel by injecting ssh keys before manually update submodule.

This is to weird and I’m wondering if I’m missing something to make it easier.


I haven’t checked yet, but I don’t think that the git submodule has something specific for Github apart from the context name.

You can simply use manual git commands (but still using your GITLAB token from Codefresh instead of SSH keys)

Happy to clarify more.


I need to pull submodule from private Bitbucket repository and facing similar issues - having to dance around ~/.ssh/known_hosts, configure another SSH key despite already having Bitbucket integration up and working, and so on.

It all could be solved if I could configure clone step to add a --recurse-submodules flag, really.

Great! I didn’t know about this flag.

I will ask our engineering team to see if we can put this into the main clone step.