Alternatively, I'd suggest just importing the root CA such that TLS validation works. Won't attempt to speak to all the reasons why this should be a must, but here's how you'd do it:
1) Grab the root certificate file.
If you're running an internal Gitlab instance, whoever set it up should be able to point you to the root CA they're using.
2) Create a new secret with the certificate file
#oc secrets new [secret name] ca.crt=[local .crt file]
oc secrets new tls-root-ca ca.crt=my-it-ca.crt
3) Attach your newly created secret to the build config
#oc patch bc/[build config name] --patch '{ "spec": {"source": { "sourceSecret": { "name": "[secret name]" } } } }'
oc patch bc/my-build --patch '{ "spec": {"source": { "sourceSecret": { "name": "tls-root-ca" } } } }'
In case you're not familiar with the patch command, this is just adding a "sourceSecret" block like this:
source:
git:
uri: https://your.gitlab.org/your-app
sourceSecret:
name: tls-root-ca
See also the openshift guide on build input secrets