Hi. I'm using a private bitbucket repository in same workspace inside another repository which contains my Node.js project as follows:
{
"dependencies": {
"example-dependency": "git+ssh://git@bitbucket.org:example-workspace/example-dependency.git"
}
}
I had also created an SSH key in Pipelines->SSH Keys in my Node.js project repository and passed public key into example's repository Access Keys.
Although I'm passing "--ssh default=$BITBUCKET_SSH_KEY_FILE" to build docker command in bitbucket pipelines, still "npm ci" command inside my Dockerfile fails.
So, how can i access a private repository inside docker container?
Hi @Sajjad Zaheri
Welcome to the community.
You can check this existing knowledge-based article on how to pass SSH key variable from Bitbucket Pipelines to a Dockerfile where you can use the SSH key to access your your private repository.
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.