Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Add SSL cert to runner before `Build setup` step

Dao Duc Minh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 25, 2025

I'm setting up a self hosted runner behind a self-signed SSL network. I have customed runner image with our SSL certificate, and it connected to BitBucket successfully. The image that is used in `bitbucket-pipelines.yml` is also customed with SSL certificate. But when triggering new pipeline run, the new spawn container still couldn't clone the repo in `Build setup` (image below)

2025-03-25_17-29.png

My `Dockerfile` looks like

RUN apt install ca-certificates -y

COPY ab.pem /usr/local/share/ca-certificates/ab.crt

RUN update-ca-certificates
RUN cp /usr/local/share/ca-certificates/ab.pem $JAVA_HOME/lib/security/ && cd $JAVA_HOME/lib/security && keytool -keystore cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias ldapcert -file ab.pem

Thank you very much!

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 26, 2025

Hi Dao Duc and welcome to the community!

I believe this issue may occur because when you use a self-hosted Linux Docker runner, the Build setup doesn't take place in the runner's container or the step's build container (for the image you define in your bitbucket-pipelines.yml). There is a separate Docker container that starts, where the Build setup takes place and the repo is cloned, and the clone directory from this container is then mounted to the step's build container.

The following documentation lists the additional images used by the runner, look for the list with the PAUSE_IMAGE, AUTH_PROXY_IMAGE, and CLONE_IMAGE:

I believe you may need to use custom images with your SSL certificate for these three images as well, and then adjust the command that starts the runner as per the example in the documentation, so that these images are used.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events