The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket pipelines dependency clone authentication using SSH Access Key

Tim Cantle
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 18, 2019

My team has a project (call it ProjectAAA) (hosted in bitbucket) which has a dependency on an externally owned and private package (also hosted in bitbucket, call it DependencyBBB). The package.json file for this project looks something like this:

"dependencies": {
"DependencyBBB": "git+https://bitbucket.org/OtherUser/DependencyBBB.git",
}  

On my computer, I can succesfully "npm install" - because OtherUser has given my account (and only my account) read/write access to DependencyBBB.

In order for ProjectAAA's bitbucket pipeline to clone DependencyBBB (npm install), I assume that the team or ProjectAAA needs read access to the DependencyBBB repository.  To do this, I have created an SSH key for ProjectAAA, and sent this to the OtherUser, who has added it to the "Access Keys" for that repository.

ProjectAAA bitbucket pipeline fails with an authentication failure - what other steps are required to enable read access to the DependencyBBB repository?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Tim Cantle
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 21, 2019

The issue was in the protocol used to clone the dependency - package.json should look like this:

"dependencies": {
"DependencyBBB": "git+git@bitbucket.org:OtherUser/DependencyBBB.git",
} 

 The SSH-keys and Access-keys configuration was correct.

TAGS
AUG Leaders

Atlassian Community Events