ERROR: HTTP request error. Status: 403: Forbidden
See original GitHub issueI am getting 403: Forbidden
error when I set up a webhook. I already set up Bitbucket Endpoints in Jenkins config. Manage hooks are checked with valid credentials and Custom Jenkins Root URL is blank.
[Fri May 29 20:04:13 UTC 2020] Received com.cloudbees.jenkins.plugins.bitbucket.hooks.PushHookProcessor$1 UPDATED event from
18.234.32.224 ⇒ https://smee.io/bitbucket-scmsource-hook/notify/ with timestamp Fri May 29 20:04:13 UTC 2020
Connecting to https://bitbucket.org with no credentials, anonymous access
ERROR: HTTP request error. Status: 403: Forbidden.
Access denied. You must have write or admin access.
com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 403: Forbidden.
Access denied. You must have write or admin access.
at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequestAsInputStream(BitbucketCloudApiClient.java:911)
at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequest(BitbucketCloudApiClient.java:923)
at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRepository(BitbucketCloudApiClient.java:388)
at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.getRepositoryType(BitbucketSCMSource.java:498)
at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieve(BitbucketSCMSource.java:546)
at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:373)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:327)
at jenkins.branch.MultiBranchProject$SCMEventListenerImpl.processHeadUpdate(MultiBranchProject.java:1592)
at jenkins.branch.MultiBranchProject$SCMEventListenerImpl.onSCMHeadEvent(MultiBranchProject.java:1192)
at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:246)
at jenkins.scm.api.SCMHeadEvent$DispatcherImpl.fire(SCMHeadEvent.java:229)
at jenkins.scm.api.SCMEvent$Dispatcher.run(SCMEvent.java:505)
at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Your checklist for this issue
-
Jenkins version: 2.222.4
-
Plugin version: 2.8.0
-
Bitbucket cloud: https://bitbucket.org/
-
Bitbucket server and version
Pipeline logs:
[Fri May 29 19:57:43 UTC 2020] Starting branch indexing...
ERROR: [Fri May 29 19:57:43 UTC 2020] Could not update folder level actions from source 7f74d52b-12c8-4fec-9cd1-46fd598951b8
com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 403: Forbidden.
Access denied. You must have write or admin access.
at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequestAsInputStream(BitbucketCloudApiClient.java:911)
at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequest(BitbucketCloudApiClient.java:923)
at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRepository(BitbucketCloudApiClient.java:388)
at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveActions(BitbucketSCMSource.java:1038)
at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:848)
at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:600)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:164)
at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1034)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:428)
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
403 Forbidden - HTTP - MDN Web Docs - Mozilla
The HTTP 403 Forbidden response status code indicates that the server understands the request but refuses to authorize it.
Read more >HTTP Error 403 Forbidden: What It Means and How to Fix It
The 403 (Forbidden) status code indicates that the server understood the request but refuses to authorize it...If authentication credentials ...
Read more >What Is a 403 Forbidden Error (and How Can I Fix It)?
A 403 Forbidden Error occurs when you do not have permission to access a web page or something else on a web server....
Read more >What Is the 403 Forbidden Error and How to Fix It (8 Methods ...
403 Forbidden – you don't have permission to access this resource is an HTTP status code that occurs when the web server understands...
Read more >403 Forbidden Error: What It Is and How to Fix It - Airbrake Blog
The 403 Forbidden Error is an HTTP response status code that indicates an identified client does not have proper authorization to access the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@deebloo Looks like in Bitbucket Team/Project, it’s at least detecting the change from webhook but not triggering the build. Please see below logs:
[Wed Jun 03 16:00:50 UTC 2020] Received com.cloudbees.jenkins.plugins.bitbucket.hooks.PushHookProcessor$1 UPDATED event from 18.234.32.227 ⇒ https://smee.io/bitbucket-scmsource-hook/notify/ with timestamp Wed Jun 03 16:00:50 UTC 2020 Connecting to https://bitbucket.org using /* (bitbucket) Repository type: Git Looking up / for branches Checking branch staging from / ‘Jenkinsfile’ found Met criteria Changes detected: staging (null → d7921764edb64513516723001e8bb388c79ac3a184) Did not schedule build for branch: staging
1 branches were processed (query completed) [Wed Jun 03 16:00:51 UTC 2020] com.cloudbees.jenkins.plugins.bitbucket.hooks.PushHookProcessor$1 UPDATED event from 18.234.32.227 ⇒ https://smee.io/bitbucket-scmsource-hook/notify/ with timestamp Wed Jun 03 16:00:50 UTC 2020 processed in 0.63 sec
@deebloo I have a multibranch pipeline project setup and configuration is in the below screenshot. When I set a periodical scan it’s working fine only webhook is not working.