Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-20172

Git LFS 2.6.0 cannot checkout from local cache on agent

    XMLWordPrintable

Details

    Description

      Summary

      Checking out source code on a remote agent when using a Git LFS repository results in a missing objects error.

      Environment

      • Git LFS 2.6.0

      Steps to Reproduce

      1. Install Git LFS 2.6.0 on your Bamboo Server
      2. Make a repository in Bitbucket
      3. Enable it for LFS in the repository settings
      4. Push some LFS objects from your local
        mkdir lfsrepotest8
        cd lfsrepotest8
        git init .
        echo Hello World > README.md
        git add README.md
        git commit -m "Initial commit"
        ls > foo.txt
        ls > bar.txt
        git add foo.txt bar.txt
        git lfs install
        head -c 1000000 /dev/urandom > cat.bin
        head -c 1000000 /dev/urandom > dog.bin
        git lfs track '*.bin'
        git add .gitattributes "*.bin"
        git commit -m "Add files"
        git remote add origin https://bitbucket/scm/lfs/lfsrepotest.git
        git push -u origin master
        
      1. Create a Bamboo build plan pointed at that repository and enable LFS under advanced options
      2. Build – there's an LFS error:

      Expected Results

      Code checkout completes successfully, and build proceeds

      Actual Results

      simple	08-Nov-2018 14:15:41	/usr/bin/git remote set-url origin ssh://0e946526-243b-495e-af65-b9ddbc2cac84@127.0.0.1:45558/lfs/lfsrepotest8.git
      simple	08-Nov-2018 14:15:41	/usr/bin/git lfs pull
      simple	08-Nov-2018 14:15:41	Scanner error: missing object: 4edd5acb13dba6a9f44a206fa1b6a1789fbcc50a
      simple	08-Nov-2018 14:15:41	
      simple	08-Nov-2018 14:15:41	Errors logged to /root/bamboo-agent-home/xml-data/build-dir/LFS-LFS8-JOB1/.git/lfs/logs/20181108T141541.4055297.log
      

      Workaround

      Option 1

      Downgrade to Git LFS 2.5.2 or upgrade to Git LFS 2.6.1.

      Option 2

      Disable remote agent caching of the repository.
      Repository -> Advanced Options -> uncheck Enable repository caching on remote agents

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rwatson@atlassian.com Robert W
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: