Bitbucket reports "An SSL error occurred, please check that the provided resource uses https."

Helcio Mayor November 14, 2022
  • Jenkins 2.361.3
  • Atlassian Bitbucket v7.21.3
  • Bitbucket Server Integration 3.3.3 plugin
  • Jenkins is set to use "Multibranch job", so repo pushes should trigger jobs in Jenkins
  • Bitbucket/Jenkins works correctly  via a multibranch webhook using HTTP both ways. 
  • Disabling 443 port gives different error when testing webhook, so I know that Bitbucket is reaching Jenkins
  • I don't have "Application Link to Jenkins" set in Jenkins, but as it works in HTTP I would expect that this feature is not necessary for Webhook integration
  • After moving Jenkins to HTTPS, Jenkins sucessfully sets webhook in Bitbucket, but it doesn't work from Bitbucket side. Testing the Webhook generated by Jenkins returns 
An SSL error occurred, please check that the provided resource uses https.

If you have any information which could help sort this issue would be great.

Thanks a lot for reading this issue and possible support in advance!

 

1 answer

1 accepted

0 votes
Answer accepted
Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 14, 2022

Hey @Helcio Mayor

Did you setup a valid SSL certificate for your Jenkins or is it self-signed certificate?

The best way to debug these kind of errors is to login to the the client machine (BitBucket) and make curl requests to the target machine (Jenkins).

Hope it helps. 

Helcio Mayor November 14, 2022

Hi Thanks for your reply. No its not a self-signed. Sure, I have to know what message Jenkins is returning really.

Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 14, 2022

Also, does Jenkins https work from other machines/clients?

The answer to this question will help focusing your search: If you manage to connect to Jenkins https from different client - Look into the BitBucket webhooks setup. If no client manage to connect to Jenkins https, look into Jenkins https configuration.     

Like Helcio Mayor likes this
Helcio Mayor November 14, 2022

Sure and thanks! Yes I can connect from different clients using HTTPS. The webhook I am testing was created from Jenkins when I saved the multibranch setup which is what Jenkins does. I have used steps similar to Adding a certificate to Jenkins on Windows. - things from here and there (joeypiccola.com) to make Jenkins to use HTTPS (I use Windows). Slight different to convert keys as I had to use powershell. I am just wondering when the api call is from Bitbucket it may try to find certificate in another path.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events