Github Webhook URL配置问题?如何解决? [英] Github webhook URL config issue? How to fix it?

查看:1517
本文介绍了Github Webhook URL配置问题?如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用GitHub项目存储库从Jenkins进行构建触发.

I am using GitHub project repository for build trigger from Jenkins.

目的是什至在GitHub存储库项目中完成代码推送时,我的Jenkins构建也应自动触发.

The intention is when even code push done in GitHub repository project my Jenkins build should trigger automatically.

已完成的步骤:

  • 为构建触发器创建Jenkins作业
  • 在该特定作业上配置设置
    • 源代码管理管理层选择了Git并更新了我从GitHub项目代码中获得的存储库URL,并更新了https Git URL
    • 更新了GitHub凭据
    • 构建触发选项
    • Create Jenkins job for build trigger
    • Config the setup on that particular job
      • Source Code Management management selected Git and updated Repository URL which I got from GitHub project code and have updated https Git URL
      • updated the GitHub credentials
      • Build trigger option

      在更新Webhook URL时,它显示错误消息:

      While updating the webhook URL it shows the error message:

      我们无法提供此有效负载:无法解析主机名

      We couldn’t deliver this payload: Couldn't resolve host name

      请参阅屏幕截图以供参考.请看一看.请分享解决方案.为什么我无法更新Webhook URL?如何解决?

      See the screenshot for reference. Please have a look. Please share the solution. Why am I unable to update the webhook URL? How to fix it?

      推荐答案

      这种情况发生的原因.

      Couple of reasons for this to happen.

      1. 如果您在本地运行->这意味着您的URL不会公开给Internet,因此您可以使用以下方法将其公开给Internet ngrok(小心,因为它将您(端口)暴露在互联网上)
      2. 公司案例->绝对是代理或防火墙问题.因此,您可以再次将ngrok与代理设置一起使用/绕过 防火墙,对如何使用它进行一些谷歌搜索会有所帮助.
      3. 您有一个Enterprise Git Repo,但仍无法点击webhook转到Manage Jenkins-> Configure System-> GitHUB,位于 您会提到您的GitHub服务器详细信息,在 那是一个前进按钮,在更下方是另一个前进 单击该按钮.为webhook添加另一个URL或使用现有的URL 您可能会提到的那一个.
      1. If your running it locally --> it means that your URL is not exposed to the internet.So you can expose it to the Internet using ngrok (becareful as it exposes you (port) to the internet)
      2. Corporate case-->Will most definitely be a proxy or firewall issue.So you can again use ngrok with proxy settings/Bypass your firewall, a bit of googling on how to do it will help.
      3. You have an Enterprise Git Repo and are still unable to hit the webhook Go to Manage Jenkins --> Configure System-->GitHUB under that you would have mentioned your GitHub Server details, Under that, there is an Advance button, Further under is another Advance button click that. Add another URL for webhook or use the existing one which you would have mentioned.

      此功能提供的整洁的小功能是测试您与GitHub的连接,并为您提供失败的原因.

      The neat little feature this provides is that it tests your connection with GitHub and provides you with the reason why it failed.

      希望这会有所帮助,我花了很长时间才弄清楚:0

      Hope this helps, took me a long time to figure this out :0

      这篇关于Github Webhook URL配置问题?如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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