Building Node.js module with private git repo dependencies

I have a build set up for a Node.js module that has a step which executes 'npm install'. The package.json file, which specifies the module's dependencies includes at least one private git repo:

+    "module-name": "git+ssh://git@github.mycompany.com:OurOrgName/module-name.git#v0.0.1",

This is a standard practice in Node.js. You can see the docs for doing so here: https://npmjs.org/doc/json.html (search for "git+ssh").

We're using a deploy key to clone our repo from github initially, which works fine. The next step is our npm install step, which itself attempts to git clone the private repos similar to what's shown above. These fail with an authentication error. Since deploy keys are 1:1 between Bamboo and a repo, it doesn't seem to make sense to use them in this scenario.

How should I be setting up my Node.js project so that it can run npm install and git clone any private repos that I have specified in its package.json file?

Thanks,

Matt

1 answer

Hi Matt!

I'm currently having the exact same issue. Did you find an answer on this?

Cheers
Michael 

Same here.. how did you solve this?

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,096 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot