Is git-lfs supported by CircleCI 2.0?

git-lfs

#1

I’m getting an error at checkout for a repository that uses git-lfs. The error is:

Error downloading object: demo/documented/bcs/aneurysm.xml.gz (95ece98fe8dbf0e3ecc46cdf01cf0a9cbd65da1f1ebc4a27eebc564dad6f978c)

Errors logged to 
/home/fenics/working/.git/lfs/objects/logs/20170321T210103.234122417.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: demo/documented/bcs/aneurysm.xml.gz: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status' and retry the checkout with 'git checkout -f HEAD'

Exited with code 128

The image has git-lfs installed. The full output is at https://circleci.com/bb/fenics-project/dolfin/21#tests/containers/0.

Is git-lfs supported by CircleCI 2.0?


#2

We got this exact same log output when we ran into GitHub’s LFS data quota:

Apart from that, LFS support generally works for us. We have this in our .circleci/config.yml:

      - run:
          name: Git LFS (install Git Large File Storage)
          command: |
            mkdir -p ~/.ssh
            ssh-keyscan -H github.com >> ~/.ssh/known_hosts
            ssh git@github.com git-lfs-authenticate "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" download
            git lfs pull

#3

Thanks - can you post a link to your full config.yml file?


#4

I don’t have a public example, but I answered a similar question here with more details:

Hope that helps.


#5

I really need to see a full config.yml file to understand how to make it work. The snippet doesn’t make clear how it plays with the checkout command. I also couldn’t get the snippet to work with Bitbucket.


#6

I see you removed git-lfs dependency in build 64. I’m checking with our engineers about this. We support git-lfs with Github, but I’m checking to see if anything is different with Bitbucket.


#7

We are using this though the install takes a while which seems not ideal:

    steps:
      - checkout
      - run:
          name: Install Git LFS
          command: |
            curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
            apt-get update
            apt-get install -y git-lfs openssh-client
            git lfs install
            mkdir -p ~/.ssh
            ssh-keyscan -H github.com >> ~/.ssh/known_hosts
            ssh git@github.com git-lfs-authenticate "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" download
            git lfs pull
      - restore_cache:

#8