0
votes

In Github i have created webhooks (http://192.168.10.98:8080/github-webhook/) and in Intergration & Services tab,I have added Jenkins (Github Plugin). In webhooks its showing

 "We couldn’t deliver this payload: Couldn't connect to server".

In Jenkins,build trigger (i chooses GitHub hook trigger for GITScm polling) Code changes are showing in Jenkins dashboard but its not updating in Server.What i need to configure for updating that changed codes through Jenkins?Can anybody help me?

3

3 Answers

0
votes

Github will have problems if you enter a local IP address as a target for the webhook. It cannot access the given IP.

0
votes

Your IP seems to be private, and for webhooks you need to provide Jenkins Public Ip(You can able to access it from anywhere connected with network)

0
votes

Addresses that start with 192.168.x.x are "non-routable" IP addresses. There are several non-routable ranges, and they are all are LAN only. See https://en.wikipedia.org/wiki/Private_network for a list of private ranges.

If a host is not on your LAN then, without some reconfiguration, it will never be able to reach your server at a 192.168.x.x address.

I recommend that you create a web server that listens on two network interfaces: one public, routable IP address that can be reached by Github; and a non-routable, LAN only address that can talk to your LAN-installed Jenkins. Github will talk to the web server, which will route traffic to your Jenkins box, and so forth.

You could directly expose your Jenkins host via a public IP address, but it is a best practice to put jenkins behind a proxy like a web server.

Also, please make sure to use a TLS security certificate with your web server. Accept only HTTPS from github (or elsewhere). A jenkins box whose traffic is not encrypted is a dangerously tempting target. There are services like https://letsencrypt.org/ that will give you a free security certificate.