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

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

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events