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!
Sull'autore
Altri risultati simili a questo
Key considerations for 2026 planning: Insights from IDC
Red Hat and Sylva unify the future for telco cloud
Edge computing covered and diced | Technically Speaking
Ricerca per canale
Automazione
Novità sull'automazione IT di tecnologie, team e ambienti
Intelligenza artificiale
Aggiornamenti sulle piattaforme che consentono alle aziende di eseguire carichi di lavoro IA ovunque
Hybrid cloud open source
Scopri come affrontare il futuro in modo più agile grazie al cloud ibrido
Sicurezza
Le ultime novità sulle nostre soluzioni per ridurre i rischi nelle tecnologie e negli ambienti
Edge computing
Aggiornamenti sulle piattaforme che semplificano l'operatività edge
Infrastruttura
Le ultime novità sulla piattaforma Linux aziendale leader a livello mondiale
Applicazioni
Approfondimenti sulle nostre soluzioni alle sfide applicative più difficili
Virtualizzazione
Il futuro della virtualizzazione negli ambienti aziendali per i carichi di lavoro on premise o nel cloud