Git Submodule not being cloned in the Pipeline build
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
This article discusses troubleshooting tips and possibles causes for Git Submodule not being cloned in the Pipeline build
Solution
Possible causes:
Submodule doesn’t clone automatically
Troubleshooting Steps:
Check if submodules are being explicitly cloned in the build. Are the submodules being explicitly cloned?
YES
Raise a Support Ticket and share the Pipeline build URL from bitbucket.org
NO
Pipelines will not automatically clone the submodule repository. You need to manually configure Pipelines to update the submodule like the below, with valid credentials (either SSH or HTTPS):
1 2 3 4 5 6 7 8
[...] script: #HTTPS - >- git config --file=.gitmodules submodule.Submod.url https://$USERNAME:$PASSWORD@bitbucket.org/team/repo.git && git submodule update --init #SSH - git config --file=.gitmodules submodule.Submod.url ssh://git@bitbucket.org/team/repo.git && git submodule update --init
Updated on March 26, 2025
Was this helpful?
Still need help?
The Atlassian Community is here for you.