Right now Bitbucket Source plugin requires putting personal password to be able to monitor branches. This is a security risk to expose such information. The proper way would be to create an OAuth consumer on Bitbucket side, set proper access permissions and use OAuth key+secret to authenticate to Bitbucket.

          [JENKINS-34262] Support for OAuth credentials

          Maxim Kulkin created issue -
          jake bishop made changes -
          Comment [ Is it true that this does not work at the moment? I have been trying to use OAuth credentials an i just get:


          {code}
          Started
          Consulting Bitbucket Team/Project
          Connecting to https://bitbucket.org using xxxx/****** (xxxxx)
          FATAL: Failed to recompute children of my-job
          com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 401: UNAUTHORIZED.

          at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getRequest(BitbucketCloudApiClient.java:416)
          at com.cloudbees.jenkins.plugins.bitbucket.client.BitbucketCloudApiClient.getTeam(BitbucketCloudApiClient.java:328)
          at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMNavigator.visitSources(BitbucketSCMNavigator.java:164)
          at jenkins.branch.OrganizationFolder.computeChildren(OrganizationFolder.java:125)
          at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:154)
          at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:122)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:410)
          Finished: FAILURE
          {code}
          ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 170325 ] New: JNJira + In-Review [ 183856 ]
          Steven Clark made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          Nikolas Falco made changes -
          Assignee Original: Antonio Muñiz [ amuniz ] New: Nikolas Falco [ nfalco ]
          Resolution New: Done [ 10000 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          Kalle Niemitalo made changes -
          Link New: This issue causes JENKINS-74972 [ JENKINS-74972 ]

            nfalco Nikolas Falco
            maximkulkin Maxim Kulkin
            Votes:
            17 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved: