tro*_*ine 14 hudson github nginx git-post-receive jenkins
我有一个GitHub存储库,我想通过post-receive钩子通知Jenkins新的提交.我已经将GitHub插件安装到Jenkins中,并允许Jenkins管理它自己的钩子URL.该项目具有正确的git存储库URL,并被指示"在将更改推送到GitHub时构建".当我有GitHub发送测试有效负载时,我在前面的Jenkins的nginx网络服务器中找到了这个:
207.97.227.233 - - [15/Sep/2011:07:36:51 +0000] "POST /github-webhook/ HTTP/1.1" 403 561 "-" "-"
Run Code Online (Sandbox Code Playgroud)
我正在运行SSL,所以我禁用它无效.我是否需要在权限矩阵中为匿名用户提供特殊权限?
请原谅缺少配置文件:我很乐意分享可能存在的内容,但我不知道分享可能有用的内容.
tro*_*ine 33
因为我不允许匿名访问,所以我需要为GitHub推送创建一个特定用户并授予它整体读取,作业创建和作业读取.还需要将身份验证捆绑到webhook URL中,如下所示:
https://foo:password@jenkins.example.com/github-webhook/
Run Code Online (Sandbox Code Playgroud)
从Github的说明(“配置全局身份验证”,第一部分),
1. Create a user in Jenkins which has, at a minimum, Job/Build permissions
2. Log in as that user (this is required even if you are a Jenkins admin user), then click on the user's name in the top right corner of the page
3. Click 'Configure,' then 'Show API Token...', and note/copy the User ID and API Token.
4. In GitLab, when you create webhooks to trigger Jenkins jobs, use this format for the URL and do not enter anything for 'Secret Token': http://USERID:APITOKEN@JENKINS_URL/project/YOUR_JOB
Run Code Online (Sandbox Code Playgroud)
就我而言,我使用了http://USERID:APITOKEN@myIPaddress:808/
并且没有project/YOUR_JOB
归档时间: |
|
查看次数: |
22960 次 |
最近记录: |