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

Allow for different HTTP & SSH endpoint URIs

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      2.2.13

      Description

      We've run into an issue with the plugin as it appears it expects the server URL defined in the Bitbucket endpoint configuration to be the same as the one to be used for cloning purposes even for SSH.
       
      So for instance if you have defined https://bitbucketserver.example.com/bitbucket as the server URL, when cloning via SSH it attempts to use ssh://bitbucketserver.example.com:7999(where 7999 is correctly read out of the clone link URLs returned by the Bitbucket API). In our case however, the web URL is different to the SSH url. For instance, based on the previous example, our SSH address is ssh://actualservername.example.com:7999/
       
      Given that Bitbucket (Server at least) returns the clone URIs in the Repository API response which is retrieved anywhere, it might be best to use the returned URIs for cloning rather than try and "guess" the correct endpoint.

        Attachments

          Issue Links

            Activity

            Hide
            vassilevsky Ilya Vassilevsky added a comment -

            I have run into the same issue.

            This plugin attempts to run:

            git fetch --no-tags --progress ssh://git@stash.example.ru/PROJ/repository.git

            But the correct command (running in a freestyle project) is:

            git fetch --tags --progress ssh://git@git.example.ru/PROJ/repository.git

            In Bitbucket Server UI, when I click the "Clone" button, I see the second URL. This is correct.

            A fix would be much appreciated!

            Show
            vassilevsky Ilya Vassilevsky added a comment - I have run into the same issue. This plugin attempts to run: git fetch --no-tags --progress ssh: //git@stash.example.ru/PROJ/repository.git But the correct command (running in a freestyle project) is: git fetch --tags --progress ssh: //git@git.example.ru/PROJ/repository.git In Bitbucket Server UI, when I click the "Clone" button, I see the second URL. This is correct. A fix would be much appreciated!
            Hide
            twz123 Tom Wieczorek added a comment - - edited

            Ilya Vassilevsky, you might want to try out a custom build of the plugin using https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/115. This addresses the issue and is reportedly working fine.

            Show
            twz123 Tom Wieczorek added a comment - - edited Ilya Vassilevsky , you might want to try out a custom build of the plugin using https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/115 . This addresses the issue and is reportedly working fine.
            Hide
            vassilevsky Ilya Vassilevsky added a comment -

            Yes, I did that, and it works, thanks. Now just waiting for a release to be able to use the plugin from the official repo, as usual.

            Show
            vassilevsky Ilya Vassilevsky added a comment - Yes, I did that, and it works, thanks. Now just waiting for a release to be able to use the plugin from the official repo, as usual.
            Hide
            twz123 Tom Wieczorek added a comment -

            Ah, I see... Good to hear that it's working for you!

            Show
            twz123 Tom Wieczorek added a comment - Ah, I see... Good to hear that it's working for you!
            Hide
            twz123 Tom Wieczorek added a comment -

            Antonio Muñiz gentle ping and request for code review

            Show
            twz123 Tom Wieczorek added a comment - Antonio Muñiz gentle ping and request for code review

              People

              • Assignee:
                amuniz Antonio Muñiz
                Reporter:
                r2b2_nz Richard Bywater
              • Votes:
                8 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: