-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
None
If we create the build trigger in quay, we are unable to get it to work with BitBucket server.
What I notice from BitBucket Server is that the http auth is getting stripped out on the Bitbucket side before it calls to quay. If I use curl, I can make the same call work to Quay, but the call from BitBucket drops the auth string prefix from the URL resulting in a 401.
Quay logs:
2020-03-17 17:07:48,699 [511] [ERROR] [util.http] Error 403: Permission Denied; Arguments: {'url': u'https://quay.apu.edu/webhooks/push/trigger/395d6bba-3752-441c-8d4d-250288727091', 'status_code': 403, 'message': 'Permission Denied', 'trigger_uuid': u'395d6bba-3752-441c-8d4d-250288727091', 'repository': ''} gunicorn-web stdout | 2020-03-17 17:07:48,699 [511] [ERROR] [util.http] Error 403: Permission Denied; Arguments: {'url': u'https://quay.apu.edu/webhooks/push/trigger/395d6bba-3752-441c-8d4d-250288727091', 'status_code': 403, 'message': 'Permission Denied', 'trigger_uuid': u'395d6bba-3752-441c-8d4d-250288727091', 'repository': ''} 192.168.11.183 () - - [17/Mar/2020:17:07:48 +0000] "POST /webhooks/push/trigger/395d6bba-3752-441c-8d4d-250288727091 HTTP/1.1" 403 30 "-" "Atlassian HttpClient 2.1.0 / Bitbucket-6.9.1 (6009001) / Default" (0.014 415 0.014) nginx stdout | 192.168.11.183 () - - [17/Mar/2020:17:07:48 +0000] "POST /webhooks/push/trigger/395d6bba-3752-441c-8d4d-250288727091 HTTP/1.1" 403 30 "-" "Atlassian HttpClient 2.1.0 / Bitbucket-6.9.1 (6009001) / Default" (0.014 415 0.014) 2020-03-17 17:07:48,702 [511] [INFO] [gunicorn.access] 192.168.11.183 - - [17/Mar/2020:17:07:48 +0000] "POST /webhooks/push/trigger/395d6bba-3752-441c-8d4d-250288727091 HTTP/1.0" 403 30 "-" "Atlassian HttpClient 2.1.0 / Bitbucket-6.9.1 (6009001) / Default" gunicorn-web stdout | 2020-03-17 17:07:48,702 [511] [INFO] [gunicorn.access] 192.168.11.183 - - [17/Mar/2020:17:07:48 +0000] "POST /webhooks/push/trigger/395d6bba-3752-441c-8d4d-250288727091 HTTP/1.0" 403 30 "-" "Atlassian HttpClient 2.1.0 / Bitbucket-6.9.1 (6009001) / Default"
(I've since deleted this webhook so the tokens/endpoints in the screenshot here are invalid).
If I form the curl call myself, I get the response that the test payload is invalid, but it passes authentication:
curl -X POST -H'Content-type: application/json' -d'{"test": true}' https://\$token:CZCEXB0YY5ILAUKI2R6GGIOMQI9L4LTAX9LG9FXAYQUT905Y9KPRQI9GC9IEGMED@quay.apu.edu/webhooks/push/trigger/395d6bba-3752-441c-8d4d-250288727091 {"error": "'commit' is a required property (authorized: token Build Trigger: custom-git)"}
—
Using quay v3.2.1 (though the same behavior was observed in v3.2.0 and previous releases). BitBucket Server is v6.9.1.
- is related to
-
PROJQUAY-397 Failed to validate bitbucket build trigger in config tool
- Closed
-
PROJQUAY-186 Unable to create bitbucket triggers
- Closed