You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
When Bamboo does a branch build of a project with submodules, it does some sort of merging on the bamboo server (which doesn't have ssh keys setup) and not on the build agent (you can tell by the file path in the error message):
Merge command error: com.atlassian.bamboo.repository.RepositoryException: RES-SESR2-1: Checkout to revision 21e93ae15004006958baf84e4daa43c27434c191 has failed.command ['C:\Program Files\Git\cmd\git.exe' submodule update --init --recursive] failed with code 1. Working directory was [C:\PROD\HOME\xml-data\build-dir\serverSide\RES-SESR2-1\mergeWorkspace]., stderr:
Submodule '*******/src/libs/TerminalCommands' (ssh://git@********:7999/frcm/terminalcommands.git) registered for path '*******/src/libs/TerminalCommands'
Cloning into 'C:/PROD/HOME/xml-data/build-dir/serverSide/RES-SESR2-1/mergeWorkspace/*******/src/libs/TerminalCommands'...
Warning: Permanently added '[********]:7999,[************]:7999' (RSA) to the list of known hosts.
git@***************.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'ssh://git@bitbucket.********.com:7999/frcm/terminalcommands.git' into submodule path 'C:/PROD/HOME/xml-data/build-dir/serverSide/RES-SESR2-1/mergeWorkspace/***********/src/libs/TerminalCommands' failed
Failed to clone '*************/src/libs/TerminalCommands'. Retry scheduled
Branch builds without submodules, however, execute entirely on the build agent according to the logs.
How can i get branch builds with submodules to execute only on the build agent?
Hi @Ari_Mahpour,
Bamboo will not mange the remote agent submodule SSH keys for you, unfortunately. There is an improvement request for this: [BAM-11369] If I want to use git submodules then I shouldn't have to upload and configure SSH keys on each Bamboo Agent.
How can i get branch builds with submodules to execute only on the build agent?
You will need to manually manage the SSH keys for each of your repository submodules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.