localhost:8080的IP地址-在github + jenkins的webhooks中 [英] IP address of localhost:8080 -in webhooks of github +jenkins

查看:348
本文介绍了localhost:8080的IP地址-在github + jenkins的webhooks中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在github中配置webhooks,以便每次我进行新推送时都将部署它,我在github中添加了web hooks,并给了jenkins地址,该地址为http://localhost:8080/github-webhook/,但它没有用,我发现我们需要找到我们的IP地址,然后将其添加如下:

I am trying to configure webhooks in github so that it will deploy every time I do a new push, I have added web hooks in github and given the address of jenkins which is http://localhost:8080/github-webhook/ but it did not work and I found out that we need to find our IP address and I added it as follows:

http://'ipaddress'/github-webhook/

但是我仍然没有让詹金斯上班吗? 谢谢

but I still did not get the jenkins to work? Thanks

推荐答案

在检测到推送请求时,需要Github指向公共地址. 本地主机在您的本地计算机上.

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

我解决的方法是使用代理Ngrok. 输入命令> ngrok http 8080,它将生成http://{hexa-numbers} .ngrok.io 复制生成的公共地址,并将其放入github存储库中的webhook http://{hexa-numbers} .ngrok.io/github-webhook中.

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.

这时,将其保存时,它将向ngrok服务器发送一个发布请求,并重定向到localhost,您将看到一个绿色的勾.

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.

这篇关于localhost:8080的IP地址-在github + jenkins的webhooks中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆