Trigger CI between GIT and jenkins through localhost

Hi,
I am trying to trigger CI between gitlab and jenkins. I installed both of them in my local machine.
Created a project locally and gave the url mentioned in jenkins in webhooks in gitlab as “http://localhost:8080/project/OJT-9” but got the error msg says Url is blocked: Requests to localhost are not allowed. Please help me how to rectify this. I do not have admin access.

Thanks,
Shobana

Hi,

try to use the real IP address of your host, and ensure that the service which listens on port 8080 does so on that address too. Likely you address follows the format 192.168.x.y.

Cheers,
Michael

1 Like

Thanks for the reply Michael.

I use my system ip instead of localhost in URL as “http://172.20.10.5:8080/project/OJT-9”. Still getting same error.

note: both jenkins and gitlab running in my local machine.

" Url is blocked: Requests to the local network are not allowed".

Hi,

just did a quick Google search with it as I had never seen that before. This issue comment looks promising:

I looked all over the Admin page for something about allow fetch local resources . I found Admin → Settings → Network → Outbound Requests → Allow requests to the local network from hooks and services

Can you verify that setting in your instance? Also, there is the possibility to whitelist specific IP ranges.

Cheers,
Michael

1 Like

Had the same issue described and worked like a charm in my case! Thank you from 4 years later.