5

I have enabled Bitbucket Pipelines in one of my node.js repositories to have it run the build on every commit. My repository depends on another node.js repository. For development I've linked the one to the other using npm link.

I've tried a git clone of that repository that is specified in the bitbucket-pipelines.yml file, but the build gets stuck on that command. I guess it's because git is asking for authentication at that point.

Is there a way to allow the container to access other repositories in the same team? Or is there a better way altogether on how to solve this? I'd also be fine with switching to another CI tool if Bitbucket Pipelines aren't capable of this – the only requirement is that it's free for teams < 5 people.

Btw. I'd like to avoid paying for npm private packages if possible.

Thanks!

amann
  • 5,449
  • 4
  • 38
  • 46
  • I have a similar case where adding the `git clone` to my `bitbucket-pipelines.yml` isn't an option. Instead, I have to add the repo URL to the `package.json` dependencies. Both repositories are hosted in Bitbucket and the repo npm is attempting to clone includes the SSH Key for the primary repo's Pipelines in its Access Keys. Pipelines fails to clone because of insufficient permissions: `Permission denied (publickey) fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.` – AWrightIV Apr 21 '17 at 22:14
  • I solved my problem by removing the password from my ssh key and adding it to the pipelines settings. – AWrightIV May 05 '17 at 18:13

1 Answers1

3

You can organize access by ssh key for another repo like described in official docs https://confluence.atlassian.com/bitbucket/access-remote-hosts-via-ssh-847452940.html

Oleksandr Diudiun
  • 4,354
  • 1
  • 15
  • 7