报错信息:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 403 No valid crumb was included in the request</title>
</head>
<body><h2>HTTP ERROR 403 No valid crumb was included in the request</h2>
<table>
<tr><th>URI:</th><td>/job/tap-manager-yidong-operate/build</td></tr>
<tr><th>STATUS:</th><td>403</td></tr>
<tr><th>MESSAGE:</th><td>No valid crumb was included in the request</td></tr>
<tr><th>SERVLET:</th><td>Stapler</td></tr>
</table>
<hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 10.0.15</a><hr/>
</body>
</html>
jenkins配置
生成 Jenkins API Token:
登录 Jenkins,点击右上角的用户名,选择 “设置”。
在 “API Token” 部分,点击 “添加新 Token”,输入描述后点击 “生成”,记录生成的 Token。
配置 GitLab Webhook:
在 GitLab 的 Webhook 设置中,将 URL 改为包含 API Token 的形式:
gitlab配置Webhook
http://<用户名>:<API Token>@<Jenkins服务器地址>/job/<项目名称>/build?token=<身份验证令牌>