简体   繁体   English

Jenkins SSL GitHub WebHooks

[英]Jenkins SSL GitHub WebHooks

I'm trying to integrate Jenkins GitHub webhooks so as to trigger the Jenkins jobs automatically whenever there is a commit made to the respective repos.我正在尝试集成 Jenkins GitHub webhooks,以便在对相应的 repos 进行提交时自动触发 Jenkins 作业。

Jenkins version: 2.138.1, github: 1.29.2, gitplugin: 3.9.1詹金斯版本:2.138.1,github:1.29.2,gitplugin:3.9.1

Jenkins is running on SSL, running with external url with security. Jenkins 在 SSL 上运行,使用安全的外部 url 运行。 Please note, when ran manually the job is able to ssh and clones the github code.请注意,当手动运行时,该作业能够 ssh 并克隆 github 代码。

Under GitHub webhook settings I have configured https://myjenkins.com/github-webhook/ by selecting " application/json " but facing below error在 GitHub webhook 设置下,我通过选择“ application/json ”配置了https://myjenkins.com/github-webhook/但面临以下错误

We couldn't deliver this payload: x509: certificate signed by unknown authority我们无法传递此有效负载:x509:由未知授权机构签名的证书

Do we need to add GitHub cert into the **/java/cacerts in Jenkins server?我们是否需要将 GitHub 证书添加到 Jenkins 服务器的 **/java/cacerts 中? am I missing any other settings?我是否缺少任何其他设置?

Can someone suggest.有人可以建议。

It's the other way around.恰恰相反。 GitHub is failing the validate the Certificate you have for Jenkins. GitHub 无法验证您拥有的 Jenkins 证书。 If you don't have a proper CA Signed certificate you can try disabling SSL Validations.(Not recommended) Or configure a proper certificate for Jenkins.如果您没有适当的 CA 签名证书,您可以尝试禁用 SSL 验证。(不推荐)或为 Jenkins 配置适当的证书。

在此处输入图像描述

If the URL you provided is the actual one, it seems your certificate is issued to *.accountservergroup.com but the hostname you are using is myjenkins.com .如果您提供的 URL 是真实的,那么您的证书似乎已颁发给*.accountservergroup.com但您使用的主机名是myjenkins.com You need to update the host to something like this myjenkins.accountservergroup.com .您需要将主机更新为类似myjenkins.accountservergroup.com的内容。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM