Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52548

Bitbucket Authentication fails if using URI path Specification

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • bitbucket-plugin
    • None
    • Jenkins 2.121.1
      Bitbucket Plugin 1.1.8
      Blue Ocean 1.6.2

      When the credentials are restricted by "URI path" the Authentication fails always. I tried many different combinations of Includes/Excludes. I get always the following Error:

      Scan Multibranch Pipeline Log:

      Started by user admin
      [Fri Jul 13 10:27:26 PDT 2018] Starting branch indexing...
      ERROR: [Fri Jul 13 10:27:26 PDT 2018] Could not update folder level actions from source blueocean
      com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 401: .
      HttpResponseProxy{HTTP/1.1 401  [X-AREQUESTID: @RAO41Bx627x450x0, X-ASEN: SEN-L11962577, Cache-Control: no-cache, no-transform, Vary: X-AUSERNAME,Accept-Encoding, Transfer-Encoding: chunked, X-Content-Type-Options: nosniff, WWW-Authenticate: OAuth realm="http%3A%2F%2Flocalhost%3A7990", Content-Type: application/json;charset=UTF-8, Date: Fri, 13 Jul 2018 17:27:26 GMT] org.apache.http.client.entity.DecompressingEntity@199a1420}
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:679)
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRepository(BitbucketServerAPIClient.java:363)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveActions(BitbucketSCMSource.java:1068)
      	at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:748)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:590)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1024)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      [Fri Jul 13 10:27:26 PDT 2018] Finished branch indexing. Indexing took 13 ms
      FATAL: Failed to recompute children of test_nightwatch
      com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 401: .
      HttpResponseProxy{HTTP/1.1 401  [X-AREQUESTID: @RAO41Bx627x450x0, X-ASEN: SEN-L11962577, Cache-Control: no-cache, no-transform, Vary: X-AUSERNAME,Accept-Encoding, Transfer-Encoding: chunked, X-Content-Type-Options: nosniff, WWW-Authenticate: OAuth realm="http%3A%2F%2Flocalhost%3A7990", Content-Type: application/json;charset=UTF-8, Date: Fri, 13 Jul 2018 17:27:26 GMT] org.apache.http.client.entity.DecompressingEntity@199a1420}
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:679)
      	at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRepository(BitbucketServerAPIClient.java:363)
      	at com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource.retrieveActions(BitbucketSCMSource.java:1068)
      	at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:748)
      	at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:590)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:276)
      	at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
      	at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1024)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE
      

      Using "Hostname:port" works like expected. For example: If the the wrong port is allowed (it should be 7990, but I included just 7997), a similar Error is thrown. 

            carlosrodlop Carlos Rodríguez López
            mikorn Michael Korn
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: