Trouble cloning repository and submodules using ssh.

I'm trying to clone a git repository and I get the following error message. I'm not sure what that message means. I have tried a number of things to try to fix it, but I was not successful.

(java.lang.RuntimeException : com.atlassian.bamboo.repository.RepositoryException: Cannot fetch branch '(unresolved) fa960aa' from 'ssh://git@{StashURL}/cm/cpa-mc-windows.git' to source directory 'C:\Bamboo\xml-data\build-dir\CMC-PDD-JOB1\cpa-mc-windows'. com.atlassian.bamboo.plugins.git.GitCommandException: command C:\progra~2\Git\bin\git.exe ls-remote ssh://40fae8cf-0aae-4390-ac9e-b0b70ede372e@ failed with code 128. Working directory was [C:\Bamboo\xml-data\build-dir\CMC-PDD-JOB1\cpa-mc-windows]., stderr: [error: cannot spawn C:\Windows\system32\config\systemprofile\AppData\Local\Temp\bamboo-ssh.41538fd5.bat: No such file or directory, fatal: unable to fork])

1 answer

1 accepted

Hi Chris,

This issue most likely due to the fact that you have not defined an ssh excecutable to the environment variables OR there is space in the path. A test you could do to isolate if this is an issue with bamboo, is to try to clone the repository manually from a command line and see if it works



Hi Sultan,

Thank you for your reply. That fixed part of the problem (The space in the path). I still had a similar issue but it was an a permissions issue with the temp folder for the agent.



Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

2,703 views 8 7
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you