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

Cannot connect to bitbucket server from Blueocean.

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • blueocean-plugin
    • None
    • Jenkins version 2.89.2
      blueocean-bitbucket-pipeline 1.5.0
      blueocean 1.4.2
      blueocean-pipeline-editor 1.4.2
      blueocean-rest 1.5.0
    • Blue Ocean - Candidates, Blue Ocean 1.6 - beta 2

      Cannot connect from Blueocean to Bitbucket server to create new pipeline. The page stays at the username password entry. We have checked the console log for Javascript error and found below.

      blueocean-core-js.js:54559 PUT http://localhost:8084/blue/rest/organizations/jenkins/scm/bitbucket-server/validate/ 404 (Not Found) . The same is attached as a screenshot.

      This blocks blueocean to Bitbucket server integration.

       

          [JENKINS-50856] Cannot connect to bitbucket server from Blueocean.

          Vivek Pandey added a comment -

          manaswinee Its hard to tell from attached image whats going on. Are there any server side log? Please also attach HAR file. If it has sensitive info, please send it to me directly over email.

          Vivek Pandey added a comment - manaswinee Its hard to tell from attached image whats going on. Are there any server side log? Please also attach HAR file. If it has sensitive info, please send it to me directly over email.

          Tharaka De Silva added a comment - - edited

          vivek I am facing the same issue. Here are the my-site.com.har and the server_log.txt files which you requested.

          Tharaka De Silva added a comment - - edited vivek I am facing the same issue. Here are the my-site.com.har  and the server_log.txt  files which you requested.

          Sachin Giri added a comment -

          When the username contains @ for email then it does not let login.

          for other users with no special chars it lets login.

          Sachin Giri added a comment - When the username contains @ for email then it does not let login. for other users with no special chars it lets login.

          Ipi Kiiskinen added a comment -

          We have the same issue. If username is an email address (contains @) in pipeline creation phase, connection test to Bitbucket Server fails. For us this is a blocker to use blue ocean, since all our usernames are email-addresses.

          Ipi Kiiskinen added a comment - We have the same issue. If username is an email address (contains @) in pipeline creation phase, connection test to Bitbucket Server fails. For us this is a blocker to use blue ocean, since all our usernames are email-addresses.

          The underlying problem seems to be that Bitbucket Server REST API expects a userSlug instead of username when fetching the user information from Bitbucket.

          The attached patch seems to fix that particular problem.

          I haven't been able to find out much (or any) information about how Bitbucket generates the userSlug from username but when looking at the Bitbucket database table sta_normal_user in our installation, the @-signs have been replaced with underscores (_).

          fix-for-bitbucket-server-email-address-usernames.patch

           

          Martti Laaksonen added a comment - The underlying problem seems to be that Bitbucket Server REST API expects a userSlug instead of username when fetching the user information from Bitbucket. The attached patch seems to fix that particular problem. I haven't been able to find out much (or any) information about how Bitbucket generates the userSlug from username but when looking at the Bitbucket database table sta_normal_user in our installation, the @-signs have been replaced with underscores (_). fix-for-bitbucket-server-email-address-usernames.patch  

            Unassigned Unassigned
            manaswinee Manaswinee Mohanty
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: