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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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@10.0.1.5:7999/myProject/myRepository.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@127.0.0.1:53081/rppol/devops.git] failed with code 128. Working directory was [C:\Users\nc-jfs\AppData\Local\Temp\9]., stderr:Remote connection failedstdout:Warning: Permanently added '[127.0.0.1]:53081' (RSA) to the list of known hosts.BAMBOO-SSH-PROXY: [SSH proxy tried to connect to [git@localhost/127.0.0.1:7999]: 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://10.0.1.5:7999 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 10.0.1.15. Any advice on how to solve this issue?

2 answers

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?

We resolved this problem.

 

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

Suggest an answer

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

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

474 views 5 7
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