首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >HTTP error 400访问/github-web钩子/。钩子应该包含事件类型

HTTP error 400访问/github-web钩子/。钩子应该包含事件类型
EN

Stack Overflow用户
提问于 2017-04-25 13:08:25
回答 1查看 2.7K关注 0票数 0

我给Gitlab的web钩子Jenkins打电话,得到以下错误:

代码语言:javascript
复制
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Error 400 Hook should contain event type</title>
    </head>
    <body>
        <h2>HTTP ERROR 400</h2>
        <p>Problem accessing /github-webhook/. Reason:

            <pre>    Hook should contain event type</pre>
        </p>
        <hr>
        <i>
            <small>Powered by Jetty://</small>
        </i>
        <hr/>
    </body>
</html>

我做了什么?我在这里读过参考资料,但没有用:

Jenkins github插件返回错误400 "Hook应包含事件类型“

为什么我再次问类似的标题:

因为上面的解决方案对我还是没用的。

我能确定的是: :

我确信Jenkins可以连接到Gitlab,因为我可以手动构建项目"X“,没有错误。我在这里的问题是,当我想要自动构建时,当我推到gitlab时,我总是会遇到这个错误。有人能帮我吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-05-10 05:55:32

看起来您使用的是GitLabGitHub插件的web钩子(http://jenkins.example.com/github-webhook/)。

您应该使用这些webhooks之一(假设您可以安装GitLab钩子插件):

  • http://jenkins.example.com/gitlab/notify_commit
  • http://jenkins.example.com/gitlab/build_now

参考文献:https://github.com/jenkinsci/gitlab-hook-plugin#build-now-hook

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43611627

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档