When Bitbucket server has both SSH and HTTPS cloning enabled, the default clone-tasks may fail because of unpredictable order of the hrefs in the array from the webhook payload.
Using this kind of expression to always get the ssh href (example for pullreq) is safer:
https://github.com/tektoncd/triggers/blob/cc1b7b73f165e9480f0cd92ac0b0f36e0f0be3e0/examples/v1beta1/bitbucket-server/triggerbinding.yaml#L11C1-L11C52
When Bitbucket server has both SSH and HTTPS cloning enabled, the default clone-tasks may fail because of unpredictable order of the hrefs in the array from the webhook payload.
Using this kind of expression to always get the ssh href (example for pullreq) is safer:
$(body.pullRequest.fromRef.repository.links.clone[?(@.name=="ssh")].href)
Best regards, David