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

Git merge requires authentication in LFS merges, plugin does not authenticate the git merge command

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins version: 2.46.3
      Git plugin version: 3.3.0
    • git client plugin 3.1.0

      In case of changes in LFS data git merge requires authentication, but authentication data is not provided.

      Pipeline step:

      def mr_checkout_with_merge(url, account) {
        checkout changelog: true, poll: true, scm: [
          $class: 'GitSCM',
          branches: [[name: '${gitlabSourceBranch}']],
          doGenerateSubmoduleConfigurations: false,
          extensions: [
            [$class: 'RelativeTargetDirectory', relativeTargetDir: 'src'],
            [$class: 'UserIdentity', email: 'jenkins', name: 'jenkins'],
            [$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true, recursiveSubmodules: true, reference: '', trackingSubmodules: false],
            [$class: 'PreBuildMerge', options: [fastForwardMode: 'NO_FF', mergeRemote: 'origin', mergeStrategy: 'default', mergeTarget: '${gitlabTargetBranch}']],
            [$class: 'CloneOption', depth: 0, noTags: false, reference: '', shallow: false, timeout: 60],
            [$class: 'GitLFSPull']
          ],
          submoduleCfg: [],
          userRemoteConfigs: [[credentialsId: account, url: url]]
        ]
      }

       Log output:

      ERROR: Branch not suitable for integration as it does not merge cleanly: Command "git merge --no-ff 6af4f83cc9f2fc96d68df589e9822acf2fbf7fee" returned status code 128:
       stdout: 
       stderr: Downloading data/test_data.tar.gz (106.24 MB)
       Error downloading object: data/test_data.tar.gz (1b3d845): Smudge error: Error downloading data/test_data.tar.gz (1b3d845ad0f78327a16db63e03a7bc60dd2f7134bbaeeb117c3602d037893eef): batch request: Permission denied (publickey).: exit status 255
      Errors logged to /home/jenkins/workspace/Precommits/Ubuntu16/src/.git/lfs/objects/logs/20170626T055343.268201821.log
       Use `git lfs logs last` to view the log.
       error: external filter git-lfs smudge – %f failed 2
       error: external filter git-lfs smudge – %f failed
       fatal: data/test_data.tar.gz: smudge filter lfs failed

            Unassigned Unassigned
            asmorkalov Alexander Smorkalov
            Votes:
            15 Vote for this issue
            Watchers:
            25 Start watching this issue

              Created:
              Updated:
              Resolved: