The content in this post may be outdated. For the most recent post concerning private Git repositories, please visit the Private Git Repositories series.
But do not worry, there is a solution.
You can upload some private key to OpenShift and authorize its public counterpart at the git hosting, and with those in place, OpenShift will be able to access your private git repository. I do not want to go into too many details here, you can read more in the documentation linked earlier.
First, generate an RSA key that is going to be uploaded to OpenShift (be careful not to overwrite your current keys)
<code>ssh-keygen -t rsa -C "my_secret_key_for_OpenShift"</code>
Then, you upload the key to OpenShift:
<code>oc secrets new-sshauth sshsecret --ssh-privatekey=$HOME/.ssh/id_rsa</code>
After that, you provide this key to the builder service account:
<code>oc secrets add serviceaccount/builder secrets/sshsecret</code>
Finally, you need to update your build configuration:
<code>oc patch buildConfig myapp -p '{"spec":{"source":{"sourceSecret":{"name":"sshsecret"}}}}'</code>
And that’s it! Authorize the public key for your repository and you are ready to go!
Sobre el autor
Más como éste
Key considerations for 2026 planning: Insights from IDC
Red Hat and Sylva unify the future for telco cloud
Crack the Cloud_Open | Command Line Heroes
Edge computing covered and diced | Technically Speaking
Navegar por canal
Automatización
Las últimas novedades en la automatización de la TI para los equipos, la tecnología y los entornos
Inteligencia artificial
Descubra las actualizaciones en las plataformas que permiten a los clientes ejecutar cargas de trabajo de inteligecia artificial en cualquier lugar
Nube híbrida abierta
Vea como construimos un futuro flexible con la nube híbrida
Seguridad
Vea las últimas novedades sobre cómo reducimos los riesgos en entornos y tecnologías
Edge computing
Conozca las actualizaciones en las plataformas que simplifican las operaciones en el edge
Infraestructura
Vea las últimas novedades sobre la plataforma Linux empresarial líder en el mundo
Aplicaciones
Conozca nuestras soluciones para abordar los desafíos más complejos de las aplicaciones
Virtualización
El futuro de la virtualización empresarial para tus cargas de trabajo locales o en la nube