"Private" Github NPM reference

I am trying to do an NPM install working as part of my build process. No problem for public NPM repos, but we also include repositories hosted in our Github account. For example:

"dependencies": {
    "config": "^1.25.1",
    "pg2iot": "git+ssh://git@github.com/[mycompanyhere]/[myprojectnamehere].git"
  }

I have added my Github user key to the Circle project, but am still getting the following error:

[Build]    npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror ssh://git@github.com/myco/myrepo.git /root/.npm/_git-remotes/git-ssh-git-github-com-my-co-my-repo-git-4f1b1a4f: undefined
[Build]    npm ERR! Linux 4.7.3-coreos-r3
[Build]    npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
[Build]    npm ERR! node v6.9.4
[Build]    npm ERR! npm  v3.10.10
[Build]    npm ERR! code ENOGIT
[Build]    
[Build]    npm ERR! not found: git
[Build]    npm ERR!
[Build]    npm ERR! Failed using git.

Any ideas what I am doing wrong?

If you could provide more information, that can go a long way to getting help.

Are you running CircleCI 1.0/2.0? What image(s) are you using? Any snippet of your CircleCI config that you can provide?

Thanks in advance.

I’m running CircleCI 1.0.

All I’m doing is an npm install in my Node project directory. The “dependencies” snippit above is from my packages.json and is referencing the private NPM package from another Github repo (which should also be accessible).

Hmm

Can you try to SSH into the build and git clone that repo yourself and see what happens?