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

Permission denied(Public Key)for submodule in Bamboo 9.2.1

Bhagyalaxmi July 26, 2023

I am trying to checkout the submodules. I used ADVANCED SETTINGS(Bamboo respositories)>Use Submodules. I ticked SSH key applies to submodules.

Even with these configurations, the bamboo plan fails.

I get the following error:

 

git@bitbucket01.com.stihlgroup.net: Permission denied (publickey).
fatal: Could not read from remote repository.
	
Please make sure you have the correct access rights
and the repository exists. 

 

2 answers

0 votes
Bhagyalaxmi August 23, 2023

Hello @Eduardo Alvarenga ,

 

The solution you provided me earlier in the thread, does not work.

Bamboo agents runs as a window service and the local system account comes into picture here.

Requesting assistance.

 

Regards,

Bhagyalaxmi

0 votes
Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 26, 2023

Hello Bhagyalaxmi,

Welcome to Atlassian Community

I am not sure which version of Bamboo you are using, but if you are using version before 8.1 you'll have to upload and configure ssh keys on each Bamboo agent, more details at https://jira.atlassian.com/browse/BAM-11369

You can also read https://confluence.atlassian.com/bamkb/plans-with-git-submodule-fail-in-bamboo-server-dc-with-repository-not-found-or-authentication-failed-messages-1026524045.html which explain few solution to fix the problem.

Regards,

Shashank Kumar

**please don't forget to Accept the answer if your query was answered**

Bhagyalaxmi July 26, 2023

Hello Shashank Kumar,

Thank you for a reply.

I am using Bamboo version 9.2. 

I tried the following the solutions proposed except the "relative SSH URLs in your .gitmodules file". I receive the same problem.

 

Regards,

Bhagyalaxmi

Bhagyalaxmi July 26, 2023

I generated the key pair using ssh command so the bamboo agent has the key pair and bitbucket server has the public key.

Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 26, 2023

Hello @Bhagyalaxmi

You will have to grant access to the same SSH public key presented on your base Linked Repository in Bamboo to any repositories linked as a submodule.

On your "main" Linked Repository options in Bamboo, expand the Advanced Options and locate the SSH public key listed on "Public key generated for this repository".

On your Bitbucket server, locate the repository listed as a submodule and add that SSH public key listed in Bamboo to Repository >> Repository Settings >> Access keys.

Kind regards,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Like # people like this
Bhagyalaxmi July 27, 2023

I made the repo a linked repository.

How to attach SSH key from the linked repository to the submodules individually?

As of now, my account at the bitbucket server has the public key from the ssh connection. In Bitbucket web interface, the keys are present in MANAGE ACCOUNT>>SSH KEYS.

I still get the same error.

Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 27, 2023

Hello @Bhagyalaxmi,

You must add the SSH public key to the Repository Properties in Bitbucket. You need Bitbucket Admin access to configure the repository keys.

  • Repository >> Repository Settings >> Access keys.

Kind regards,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Like Bhagyalaxmi likes this
Bhagyalaxmi July 28, 2023

Hello @Eduardo Alvarenga ,

Here, what is the purpose of creating a linked repository?

Regards,

Bhagyalaxmi

Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 28, 2023

Hello @Bhagyalaxmi,

You can still use Plan Repositories for that task. Linked repositories are the recommended practice as Plan repositories are planned to be deprecated.

Submodules will also work at the Plan level.

For more information please check this page:

Best regards,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events