When checking out submodules Bamboo receives a Host key verification failed error like below
- Configure Bitbucket Server repository with submodules
- Add repository to Linked Repositories in Bamboo
- Configure Bamboo plan to checkout repository
Bamboo checks out submodules without issue
The below exception is thrown in the build log file:
- Git submodule command accesses local ssh proxy checking fingerprint of server.
- Bamboo is using generated ssh key for main repository, not the one for the submodule
- Add to ~/.ssh/config two lines to ignore fingerprint when connecting to localhost.
If the modification above is successful, the proxy will be able to connect to Bitbucket Server (fka Stash) to subsequently run the submodule command.
- Run Git Clone command for the submodule repository manually to verify the host key
When you use submodule with global path, git will bypass the on-demand, intermediary, locally created SSH proxy that it normally uses to connect to the repo, and connect to it directly. This requires that the SSH key must be available at the OS level. However, when your submodule uses a relative path, git will interface with it via the proxy similarly to how it connects to the parent repository. For this reason, it might be necessary to duplicate and copy the auto-generated, public SSH access key of the parent repository to the Access Keys of each related submodule repo.