Git on our Jenkins server can't resolve host names that point outside of the local network for it's proxy(our DMZ).
This was fine when we only had the master node since our GitLab server shares the same proxy and is therefore accessible locally, but it causes problems with new build agents are not located in the DMZ and that have no reason to be proxied and therefore need to use the public URL to access our GitLab server.
I have tried checking the DNS settings and they are fine. I have also tried looking up the GitLab URL using dig and it worked. using git with the URL works on other machines.