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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,237
Community Members
 
Community Events
184
Community Groups

Git submodules using ssh on a remote agent

Hi,

I am having a problem with my submodules in bamboo. I'm using GIT. This is a Windows machine. I was able to get the submodules to work by adding my ssh key into the bamboo home directory, but I don't know if that same fix is supposed to work with an agent.

Has anyone been successful in cloning submodules using an remote agent?

2 answers

1 accepted

0 votes
Answer accepted
Sultan Maiyaki
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 10, 2013

Hi Chris,

I feel you are experiencing the issue reported at https://jira.atlassian.com/browse/BAM-11369 The available workaround are two folds:

# Use private key fro the repository that are not protected by passpharase

# Setting up each agent .ssh/config configuration manually to allow Remote Agent machines access your git repository via ssh (using private SSH keyfiles stored on those machines).

Try the options and lets know how it goes for you.

Regards,

Sultan

Hi Sultan,

My private keys do not have a passphrase.

As for the second point, I'm not sure where the Bamboo is looking to find the .ssh private key. I have a few on the Remote Agent. Is the path "%USERPROFILE%\.ssh"? Or is Bamboo looking in a different location?

Thanks,

Chris

Sultan Maiyaki
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 11, 2013

Yes Bamboo is looking at the %USERPROFILE%\.ssh directory

Could you please provide an example of how my config should look like? I set mine up to as

*

IdentityFile C:\Users\{current user}\.ssh\id_rsa

That is where my private key is located. Although the submodules are still giving me a "permission denied" error.

Here is the error I get:

Warning: Permanently added '[StashURL:7999' (RSA) to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Clone of 'ssh://git@StashURL:7999/sm/windows-common.git' into submodule path 'common' failed)

When I run the command in the command prompt, it clones the repo just fine.

I created a work around. I had a different machine checkout the code and this PC compile it. After a while, I accidentally forgot to set this new machine as a requirement and the checkout of the submodules worked.

Sultan Maiyaki
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jun 20, 2013

Hi Chris,

Thanks alot for the feedback

Did you ever get to the bottom of where to locate the private key on the remote agent? I'm still trying to solve this problem.

You know. I never did, but i did find a solution for myself.

I'm not sure if it was my particular instance or just how bamboo handles submodules, but it kept looking for the ssh key in "$Git_repository/y/.ssh". I ended up just comitting "/y/.ssh/config" into my repository that pointing to the ssh key I wanted to use, then everything worked just fine.

@Sultan Maiyaki but Bamboo is running as service, so where is the %USERPROFILE%\.ssh ? i had tried with /User/Default/.ssh but no luck to make it work.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events