我有一个GitHub仓库,我希望通过post-receive钩子通知Jenkins新的提交。我已将GitHub插件安装到Jenkins中,并允许Jenkins管理它自己的挂钩网址。该项目具有正确的git存储库URL,并被指示在将更改推送到GitHub时进行构建。当我有GitHub发送一个测试有效载荷时,我在nginx网络服务器的前面Jenkins找到了这个:
I have a GitHub repository which I would like to have notify Jenkins of new commits via a post-receive hook. I've installed the GitHub plugin into Jenkins and have allowed for Jenkins to manage it's own hook URLs. The project has the correct git repository URL and is instructed to "Build when a change is pushed to GitHub". When I have GitHub send a test payload I find this in the nginx webserver that front's Jenkins:
207.97.227.233 - - [15/Sep/2011:07:36:51 +0000] "POST /github-webhook/ HTTP/1.1" 403 561 "-" "-"我正在运行SSL,因此我将其禁用至无效。我需要为权限矩阵中的匿名用户提供特殊权限吗?
I was running SSL so I disabled it to no effect. Do I need to provide special permissions to an anonymous user in the permissions matrix?
请原谅缺少配置文件:我很乐意分享那些可能存在的我不知道什么可能是有用的共享。
Please forgive the lack of configuration files: I'm happy to share those that might exist but I don't know what might be useful to share.
推荐答案因为我不允许匿名访问,事实证明我需要为GitHub推送创建一个特定的用户并授予它全面阅读,作业创建和作业阅读。还有必要将身份验证绑定到webhook URL中,如下所示:
As I don't allow anonymous access, it turns out I needed to create a specific user for GitHub pushes and to grant it Overall read, Job create and Job read. It was also necessary to bundle the authentication into the webhook URL, like so:
foo:password@jenkins.example/github-webhook/更多推荐
Jenkins和GitHub webhook:HTTP 403
发布评论