To run a build of my application in Bitbucket Pipeline, I need to download its dependencies first.
I'm using composer do manager dependencies, but it would be the same with npm.
{ "repositories": [ { "type": "vcs", "url": "git@bitbucket.org:mycompany/myrepository.git" } ], "require": { "mycompany/myrepository": "dev-master", } }
image: phpunit/phpunit:5.5.0 pipelines: default: - step: script: - composer install - phpunit
Bitbucket Pipeline don't have access to clone the private Git repository.
[RuntimeException] Failed to execute git clone --no-checkout 'git@bitbucket.org:mycompany/myrepository.git' '/opt/atlassian/pipelines/agent/build/vendor/mycompany/myrepository' && cd '/opt/atlassian/pipelines/agent/build/vendor/mycompany/myrepository' && git remote add composer 'git@bitbucket.org:mycompany/myrepository.git' && git fetch composer Cloning into '/opt/atlassian/pipelines/agent/build/vendor/mycompany/myrepository'... error: cannot run ssh: No such file or directory fatal: unable to fork
Community moderators have prevented the ability to post new answers.
Hi Jérôme,
It's hard to tell from the error message exactly what the issue is, but in order to clone other private repositories you'll need to make sure the necessary tools are installed in the docker image that you're using (git, ssh) and you'll need to configure ssh. Here are some guides for configuring ssh:
https://answers.atlassian.com/questions/39429257
https://answers.atlassian.com/questions/39243415
cheers,
Steven
just faced this issue so if anyone is having that issue the simple solution is to install ssh client on the pipeline image
script:
- apk add openssh-client
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.