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

Bitbucket Server Integration cannot checkout to the remote in a pipeline job

      I have used many pipeline jobs and define the bbs_checkout steps.
      In a pipeline job, it seems that the `bbs_checkout` with the newer version of the plugin cannot access to the credentials
      or something is wrong with the ssh username and password secrets.

      Here is my step code:

      bbs_checkout branches: [[name: "*/${GIT_BRANCH}"]], projectName: GIT_PROJECT, repositoryName: GIT_REPOSITORY, serverId: '21197389-53b2-4e6a-8bf8-b24661cc08b7', sshCredentialsId: GIT_CREDENTIALS
      

      And the logs are below:

      Bitbucket - responded with not authorized 
      May 06, 2022 1:55:53 PM INFO com.atlassian.bitbucket.jenkins.internal.scm.BitbucketScmHelper getRepository
      Error creating the Bitbucket SCM: Something went wrong when trying to contact Bitbucket Server: Provided credentials cannot access the resource
      May 06, 2022 1:55:53 PM INFO com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCM initializeGitScm
      

      This is totally fine when I use the plugin version 2.1.3 with the same credentials. Is there anything spec changed?

          [JENKINS-68423] Bitbucket Server Integration cannot checkout to the remote in a pipeline job

          Daeho Ro created issue -
          Martin Henschke made changes -
          Priority Original: Trivial [ 5 ] New: Critical [ 2 ]
          Daeho Ro made changes -
          Description Original: I have used may pipeline job and define the bbs_checkout step. In a pipeline job, it seems that the bbs_checkout with the newer version of the plugin cannot access to the credentials
          or something is wrong with the ssh username and password secrets.

          Here is my step code:
          {code}
          bbs_checkout branches: [[name: "*/${GIT_BRANCH}"]], projectName: GIT_PROJECT, repositoryName: GIT_REPOSITORY, serverId: '21197389-53b2-4e6a-8bf8-b24661cc08b7', sshCredentialsId: GIT_CREDENTIALS
          {code}

          And the logs are below:
          {code}
          Bitbucket - responded with not authorized
          May 06, 2022 1:55:53 PM INFO com.atlassian.bitbucket.jenkins.internal.scm.BitbucketScmHelper getRepository
          Error creating the Bitbucket SCM: Something went wrong when trying to contact Bitbucket Server: Provided credentials cannot access the resource
          May 06, 2022 1:55:53 PM INFO com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCM initializeGitScm
          {code}

          This is totally fine when I use the plugin version 2.1.3 with the same credentials. Is there anything spec changed?
          New: I have used many pipeline jobs and define the bbs_checkout steps.
          In a pipeline job, it seems that the `bbs_checkout` with the newer version of the plugin cannot access to the credentials
          or something is wrong with the ssh username and password secrets.

          Here is my step code:
          {code}
          bbs_checkout branches: [[name: "*/${GIT_BRANCH}"]], projectName: GIT_PROJECT, repositoryName: GIT_REPOSITORY, serverId: '21197389-53b2-4e6a-8bf8-b24661cc08b7', sshCredentialsId: GIT_CREDENTIALS
          {code}

          And the logs are below:
          {code}
          Bitbucket - responded with not authorized
          May 06, 2022 1:55:53 PM INFO com.atlassian.bitbucket.jenkins.internal.scm.BitbucketScmHelper getRepository
          Error creating the Bitbucket SCM: Something went wrong when trying to contact Bitbucket Server: Provided credentials cannot access the resource
          May 06, 2022 1:55:53 PM INFO com.atlassian.bitbucket.jenkins.internal.scm.BitbucketSCM initializeGitScm
          {code}

          This is totally fine when I use the plugin version 2.1.3 with the same credentials. Is there anything spec changed?
          Atlassian Bitbucket Server made changes -
          Labels New: triaged
          Martin Henschke made changes -
          Link New: This issue is related to JENKINS-65466 [ JENKINS-65466 ]
          Martin Henschke made changes -
          Assignee New: Martin Henschke [ mhenschke_atlassian ]
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            mhenschke_atlassian Martin Henschke
            lamanus Daeho Ro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: