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

Cannot resolve mirrors using folder-level credentials

XMLWordPrintable

    • 3.2.0

      Steps to reproduce:

      • Create a new folder in Jenkins
      • Create username-password credentials scoped to that folder for your mirrored BBDC instance
      • Create a new job that uses a Bitbucket SCM (Freestyle, Multibranch Pipeline etc.)
      • Set the SCM of the job as a Bitbucket SCM
      • For credentials, use the folder credentials created earlier
      • Enter any project and repository that is cloned by a mirror
      • Click on "Clone from" in the menu

      Expected
      A list of all available mirrors cloning your project appear in the dropdown

      Actual
      Only the Primary Server appears. In the Jenkins logs, the following rather unhelpful error appears:

      INFO	c.a.b.j.i.h.HttpRequestExecutorImpl#handleError: Bitbucket - responded with not authorized 
      

      Workaround
      There is no workaround

      This issue is occurring because the mirror resolver does not have access to the job context, and is always resolving using the root Jenkins context, a bug we've addressed several times in the past in different places. A fix for this should remove any ambiguity over the context in which credentials are resolved.

            mhenschke_atlassian Martin Henschke
            mhenschke_atlassian Martin Henschke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: