-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Affects Version/s: 10.2.5
-
Component/s: Repository (Bitbucket)
-
None
-
1
-
Severity 3 - Minor
-
1
Issue Summary
Submodules checkout does not work in Bamboo connected to Bitbucket Cloud repositories where Absolute URL's are used in .gitmodules file and SSH key applies to submodules option is enabled in Bamboo.
Steps to Reproduce
1) Create a repository in Bitbucket Cloud and add a submodule to it.
2) The gitmodules file should have the absolute URL used, example below where webhooks.git is the submodule repository.
[submodule "webhooks"]
path = webhooks
url = git@bitbucket.org:workspace_name/webhooks.git
3) Generate a key pair in your Bamboo server by logging in with the same user who is running Bamboo by running the below command.
ssh-keygen -t ed25519
4) The keys will be generated inside ~/.ssh folder on the Bamboo server. Copy the Public key and create a SSH key inside the Bitbucket cloud profile at https://bitbucket.org/account/settings/ssh-keys/
5) Now Inside Bamboo save the Private key generated at step 3 as a Shared Credential.
6) Create a new Linked repository in Bamboo of type Bitbucket Cloud and choose authentication type as SSH Private Key and use the shared credential and choose the one saved above, see attached.

7) Click on Test connection and the repository should connect successfully.
8) Under Advanced options enable "Use submodules" and "SSH key applies to submodules", see attached.
9) Create a plan in Bamboo with a source code checkout task and link this repostory and run the plan.
10) The Build runs on a Linux remote agent where no SSH configuration was done neither any keys were added.
Expected Results
The source code checkout should happen properly.
Actual Results
Source code checkout fails with error : error in libcrypto
ror 02-Sep-2025 10:40:07 Cloning into '/var/atlassian/application-data/bamboo-agent/xml-data/build-dir/SCRIP-TIC1-JOB1/webhooks'... error 02-Sep-2025 10:40:07 Warning: Permanently added 'bitbucket.org' (ED25519) to the list of known hosts. error 02-Sep-2025 10:40:07 Load key "/tmp/pkey306753370085967863.tmp": error in libcrypto error 02-Sep-2025 10:40:07 git@bitbucket.org: Permission denied (publickey). error 02-Sep-2025 10:40:07 fatal: Could not read from remote repository. error 02-Sep-2025 10:40:07 Please make sure you have the correct access rights error 02-Sep-2025 10:40:07 and the repository exists. error 02-Sep-2025 10:40:07 fatal: clone of 'git@bitbucket.org:skumar141/webhooks.git' into submodule path '/var/atlassian/application-data/bamboo-agent/xml-data/build-dir/SCRIP-TIC1-JOB1/webhooks' failed error 02-Sep-2025 10:40:07 Failed to clone 'webhooks' a second time, aborting error 02-Sep-2025 10:40:07 at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:1018) error 02-Sep-2025 10:40:07 at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:945) error 02-Sep-2025 10:40:07 at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:936) error 02-Sep-2025 10:40:07 at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runSubmoduleUpdateCommand(GitCommandProcessor.java:538) error 02-Sep-2025 10:40:07 at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.checkout(NativeGitOperationHelper.java:501) error 02-Sep-2025 10:40:07 ... 28 more
Workaround
This works properly if in the .gitmodules file relative path is used, example
[submodule "webhooks"]
path = webhooks
url = ../webhooks.git
- mentioned in
-
Page Loading...