Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Checkout Source Code uses wrong SSH on Remote Agent

Hi all,

I am attempting to run a Checkout Source Code task on a remote windows agent. The repository is linked to a Bitbucket server repository. I am able to connect to the repository from the machine which the remote agent is installed through the terminal outside of Bamboo with for example:

git clone ssh://git@

 When using the Bamboo Checkout Source Code I get the following error:

Cannot fetch branch '(unresolved) HashAndSource{refName=[null], branch=[master], hash=[5f518cf54dfe9fd19c87714aef2896ae9a485094]}' from 'ssh://git@localhost:7999/rppol/devops.git' to source directory 'C:\remote_agent_home\xml-data\build-dir\DAT-OCD3-JOB1\DevOps'. com.atlassian.bamboo.plugins.git.GitCommandException: command ['C:\Program Files\Git\bin\git.exe' ls-remote ssh://8ae100db-074f-4837-a767-8b687e754a6c@] failed with code 128. Working directory was [C:\Users\nc-jfs\AppData\Local\Temp\9]., stderr:Remote connection failedstdout:Warning: Permanently added '[]:53081' (RSA) to the list of known hosts.BAMBOO-SSH-PROXY: [SSH proxy tried to connect to [git@localhost/]: and failed due to the following error: [Remote connection failed]: Failed to get the session.]fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.

To solve the issue, I have attempted the following:

- Setting up ssh keys on the remote machine and Bitbucket and from Bamboo to Bitbucket. This seems not to be the issue as I am able to connect locally.

- Adjusting the ssh base url in Bitbucket server settings. Have tried both ssh:// and ssh://localhost:7999.

- Opening 7999 ports on both servers


Since ssh works through the terminal on the remote machine, I do not think it has to do with permissions. It seems to me, that the localhost which Bamboo attempts to use should actually be Any advice on how to solve this issue?

2 answers

We resolved this problem.


Deleting and readding the repository worked. This is something to be aware of when cloning repositories.

Hi @Jeppe Finne Sørensen 

Can you provide the Git executable path added to the agent matrix (Bamboo capabilities). Also, where you have installed the Git on remote agent machine? What is remote agent installation path?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo Data Center is here!

G’day Bamboo customers, The wait is over! Bamboo Data Center edition you have been asking for is finally here! This self-managed enterprise offering of Bamboo has the resilience, reliability, and s...

567 views 1 17
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you