我给Gitlab的web钩子Jenkins打电话,得到以下错误:
<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时,我总是会遇到这个错误。有人能帮我吗?
发布于 2017-05-10 05:55:32
看起来您使用的是GitLab和GitHub插件的web钩子(http://jenkins.example.com/github-webhook/)。
您应该使用这些webhooks之一(假设您可以安装GitLab钩子插件):
http://jenkins.example.com/gitlab/notify_commithttp://jenkins.example.com/gitlab/build_now参考文献:https://github.com/jenkinsci/gitlab-hook-plugin#build-now-hook
https://stackoverflow.com/questions/43611627
复制相似问题