docker-compose file:
ARG SSH_PRIVATE_KEY
RUN mkdir ~/.ssh/
RUN echo "${SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa
RUN chmod 600 ~/.ssh/id_rsa
RUN ssh-keyscan bitbucket.org >> ~/.ssh/known_hosts
getting:
git@bitbucket.org: Permission denied (publickey).
when reaching the yarn install command
It was because the ssh key i'd used had been created with a passphrase. I made a new one without and it worked without issue.
Welcome to the community.
To debug your Docker composer container further, would you be able to add the below command?
ssh -Tvv git@bitbucket.org
This will give you more information about the "Permission denied" error message you're getting.
Let me know how it goes.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.