用于github.com的Openshift v3 webhook

时间:2016-10-16 16:23:44

标签: github openshift webhooks

我尝试为github添加webhook。我从build&page页面复制了webhook并将其添加到github repo。并获得了401 Unautorized。

结果相同:

curl -i -H "Accept: application/json" -H "X-HTTP-Method-Override: PUT" -X POST -k https://api.preview.openshift.com/oapi/v1/namespaces/project.metadata.name/buildconfigs/buildConfig.metadata.name/webhooks/mysecret/github

HTTP/1.1 401 Unauthorized
Cache-Control: no-store
Content-Type: application/json
Date: Sun, 16 Oct 2016 16:12:42 GMT
Content-Length: 228

{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "the webhook \"github\" for \"buildConfig.metadata.name\" did not accept your secret",
"reason": "Unauthorized",
"code": 401
}

OpenShift Origin的问题列表包含这样的内容,但它已修复。

$oc version

oc v1.3.0
kubernetes v1.3.0+52492b4
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://api.preview.openshift.com:443
openshift v3.3.0.35
kubernetes v1.3.0+52492b4

0 个答案:

没有答案