Inject SSH keys into Buildkite Runner

Hi,

We are using the Docker Image of the Buildkite Runner and we are trying to access a private GitHub repo over ssh. How can we inject the SSH private key into the Buildkite Runner to successfully pull the repo?

Thanks,
Al

How are you running the docker image? If it’s a “docker run” then check the ssh sock approach in the docker-compose.ci.yml @ GitHub - ace-teknologi/buildkite-private-git-access: You're using buildkite and looking to make use of a private git repo, here's one way.

We are using the CloudFormation template. I was thinking maybe using a custom docker image but there isn’t any option for that in CloudFormation.

The documentation does cover how to inject an SSH Private Key into the Elastic CI stack agents to clone private repos: Elastic CI Stack for AWS Overview v3 | Buildkite Documentation

Hi @alwb! :wave:

Welcome to the community! :blush:

What Samuel mentioned is correct. You can check the information on how to inject SSH keys on our docs, and if you are having issues you can contact support (support@buildkite.com) with your build information and configurations so we can help you out.

Thanks!