Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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

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
TAGS
AUG Leaders

Atlassian Community Events