I have a bitbucket pipeline that works well but now on a project I need to pull from a private repository which contains a package that is required in my composer.json.
When I do a composer install
in the pipeline, it stops with this error
Failed to execute git clone --no-checkout '[email protected]:company/package.git' [...]
Cloning into '/opt/atlassian/pipelines/agent/build/vendor/company/package'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
The pipeline do not have any SSH key defined so it's not allowed to pull, but how could I define one since it's ephemeral?
Or maybe I should define the requirement otherwise?