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

Building Node.js module with private git repo dependencies

Matt Walters August 14, 2013

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

2 answers

0 votes
Matthew Shaile April 11, 2018

More than 4 years without an answer, so I'm not holding my breath but, does anyone have the solution for this?

0 votes
Michael Hunziker October 6, 2016

Hi Matt!

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

Cheers
Michael 

Ishay Mamluk November 12, 2017

Same here.. how did you solve this?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events