IP address of localhost:8080 -in webhooks of github +jenkins

主宰稳场 提交于 2019-12-03 01:47:24
Ronny Ling

You need a public address for Github to point to when detected a push request. localhost is on your localmachine.

The way i solved it is to use a proxy agent Ngrok. Enter command >ngrok http 8080, it will generate http://{hexa-numbers}.ngrok.io copy the generated public address and put in your github repository webhook http://{hexa-numbers}.ngrok.io/github-webhook/.

At this point when you save it, it will send a post request to ngrok server, got redirected to localhost and you will see a green tick.

If you are talking about github.com, then yes, localhost would not work.
As mentioned in "GitHub webhook configuration "

the Jenkins instance must be able to connect to GitHub and vice versa.

You can check that with the "Test hook" button from the GitHub UI and see if Jenkins receive a payload.

Make sure you have the JENKINS GitHub Plugin properly installed and configured.

You still need to provide the port in your url:

http://ipaddress:8080/github-webhook/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!