Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket webhook to build jenkins Job 403

Asif Khalil
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 22, 2021

Jenkins is running on my http://localhost:8080

<blockquote id="error"> 129<p><b>Access Denied.</b></p> 130</blockquote> 131 132<p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p> 133 134<p>Your cache administrator is <a href="mailto:webmaster">webmaster</a>.</p> 135<br> 136</div> 137 138<hr> 139<div id="footer"> 140<p>Generated Fri, 22 Oct 2021 14:00:35 GMT by ip-10-101-38-42.net.atlassian.com (squid)</p> 141<!-- ERR_ACCESS_DENIED -->

 

Jinkins Webhook URL Configured :   http://localhost:8080/bitbucket-hook

Please how i fix 403 Access Denied error. 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 26, 2021

Hi Asif,

Localhost refers to the local computer where a program is running. Bitbucket Cloud cannot access your webhook if you are using localhost, this can only be accessed by the server where Jenkins is running in your local network. You will need to use the public IP address or domain name in the URL, instead of localhost.

In case your server is behind a firewall, you may also need to whitelist our IP addresses for webhook delivery. You can check the following documentation page for this, specifically the section "Valid IP addresses for webhook delivery":

Kind regards,
Theodora

Shyam_corecon
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 2, 2023

Hi Team 

I am still getting the same error even after changing localhost to public IP 

<blockquote id="error"> <p><b>Access Denied.</b></p> </blockquote> <p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p> <p>Your cache administrator is <a href="mailto:webmaster">webmaster</a>.</p> <br>

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 2, 2023

Hi @Shyam_corecon,

If your server is behind a firewall, you may need to whitelist the IPs used by Bitbucket Cloud for webhook delivery (see my previous answer). Some other configuration on your server or network may also prevent our requests from reaching your server, you'll need to reach out to your network admin about this.

Kind regards,
Theodora

Shivangi Saxena
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2023

Hi @Theodora Boudale ,

 

I am getting the same error. I am using bitbucket cloud and trying to create a request to Jenkins installed on my local setup(laptop). I am using the IP in jenkins URL passed in bitbucket webhook

 

<blockquote id="error"> <p><b>Access Denied.</b></p> </blockquote> <p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p> <p>Your cache administrator is <a href="mailto:webmaster">webmaster</a>.</p> <br>

 

Is there anything you can help with?

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 23, 2023

Hi Shivangi,

Is the IP you are using in Jenkins URL private or public? Bitbucket Cloud needs a public IP address, otherwise, it won't be able to reach your Jenkins.

Kind regards,
Theodora

Shivangi Saxena
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 23, 2023

thanks for your response, yes jenkins IP is private. what needs to do make the successful connection from public bitbucket cloud to private jenkins ip?

Pratima Maiti June 23, 2023

Hi @Theodora Boudale ,

If bitbucket is hosted on public cloud and Jenkins is installed on client network. Then how can we send a successful request from bitbucket to Jenkins?

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 26, 2023

Hi Shivangi and Pratima,

Bitbucket Cloud cannot reach a private IP. Private IP addresses are used in an internal network (e.g. your home network) and are assigned to all devices connected to that local network. Bitbucket Cloud can only reach a public IP or a domain name that is accessible over the internet, at least from the IPs that Bitbucket uses for webhook delivery. The IPs that Bitbucket Cloud uses for webhook delivery are here:

Jenkins is not built by Atlassian so I don't know the exact changes you need to make on Jenkins side. I found the following post that may be useful:

If you need further assistance, I would suggest posting a question on the Jenkins forum.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events