-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Branches auto-discovering not working on Bitbucket server #799
Comments
You claim to be using Bitbucket Server, but I assume that is a mistake on your part. Only Bitbucket Data Center has support for HTTP access tokens on project/repository level: |
The differentiation I'm aware of is between Bitbucket Server and Bitbucket Cloud. Bitbucket Server is a self-hosted solution, often deployed in a Data Center. This is the method I am using. |
I don't think you can use the project key as the credentials user name. Try with a real user or, as may have been your intention, follow: |
Thanks @Enrice (thanks). Reading the documentation I see
|
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Bitbucket Server v8.9.6
Jenkins 2.426.2
OS: Linux - 4.18.0-372.80.1.el8_6.x86_64
Java: 17.0.9 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
Bitbucket Branch Source Plugin 856.v04c46c86f911
Pipeline: Multibranch 756.v891d88f2cd46
Reproduction steps
Setup a multi-branch project with a Single repository source
Get credentials to access the Bitbucket API
Create a Bitbucket HTTP access tokens (project admin)
Bitbucket Endpoints configuration in Jenkins > Manage Jenkins
Added Jenkins Credentials:
Configure the multi-branch project source
Expected Results
Expected was a working integration between Jenkins and Bitbucket server. But the Repository Name in Branch Sources can't be filled in and doesn't show a drop down.
Actual Results
Repository Name in Branch Sources can't be filled in and doesn't show a drop down.
Anything else?
As a result the Scan Multibranch Pipeline Logs show the following
[Wed Jan 17 13:54:57 UTC 2024] Starting branch indexing... ERROR: [Wed Jan 17 13:54:57 UTC 2024] Could not update folder level actions from source f0326964-f8d1-41b6-9041-46ce232fcc15 [Wed Jan 17 13:54:57 UTC 2024] Finished branch indexing. Indexing took 9 ms FATAL: Failed to recompute children of tests » stack-aws-container-registery-maianni1-test com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 403: . HttpResponseProxy{HTTP/1.1 403 [Date: Wed, 17 Jan 2024 13:54:57 GMT, Content-Type: application/json;charset=UTF-8, Content-Length: 70, Connection: keep-alive, Set-Cookie: AWSALB=z+cAOlLFOnOuMM++etnNvbLkfogJt4wOp3Tm97i//z27yGJr+O+qiXCSfSXCM5R1TLM7H+Yq+PnGj0+UTeZsn4ovzEcfYktOOMRSbJFalpsFKoQsQ5hFBCturSlE; Expires=Wed, 24 Jan 2024 13:54:57 GMT; Path=/, Set-Cookie: AWSALBCORS=z+cAOlLFOnOuMM++etnNvbLkfogJt4wOp3Tm97i//z27yGJr+O+qiXCSfSXCM5R1TLM7H+Yq+PnGj0+UTeZsn4ovzEcfYktOOMRSbJFalpsFKoQsQ5hFBCturSlE; Expires=Wed, 24 Jan 2024 13:54:57 GMT; Path=/; SameSite=None; Secure, X-AREQUESTID: *VA1LQ8x834x14525318x1] ResponseEntityProxy{[Content-Type: application/json;charset=UTF-8,Content-Length: 70,Chunked: false]}} at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:978) at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRepository(BitbucketServerAPIClient.java:494) at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveActions(BitbucketSCMSource.java:1107) at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:847) at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:611) at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:269) at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:167) at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1057) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Finished: FAILURE
Are you interested in contributing a fix?
No response
The text was updated successfully, but these errors were encountered: