Issue with Jenkins and Git submodules Issue with Jenkins and Git submodules jenkins jenkins

Issue with Jenkins and Git submodules


To anybody getting similar issues, check the box for Jenkins to wipe out the local workspace and force repository clone once. That worked for me ;)


Apparently 'top' is one of your submodules. The main repo that contains submodules just stores a commit ID of each of the submodules as reference to them. I interpret the error message as if there is a commit ID for 'top' in the main repo that cannot be found (does not exist?) in 'top'. I'd check this to be sure about this.

In the last project I worked with Git submodules and Jenkins we didn't use the Git plugin's Advanced sub-modules behaviours but executed all the git submodule ... commands in a Builder: Execute shell step of the Conditional BuildStep Plugin. Conditional to be able to abort the build if something goes wrong during these Git commands.


top branch sha mismatched to the commited sha for the submodule.

Consider enabling "Update tracking submodules to tip of branch" option.

This may not work for tags though.