When you explicitly or implicitly execute a git-lfs subcommand in Pipelines, you will get an error below:
This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.
TL;DR - You can install the git-lfs command as below:
image: atlassian/default-image:2 clone: lfs: true pipelines: branches: master: - step: name: Sample script: - curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash - apt-get install git-lfs - git checkout -b "$(date +%s)"
Or, consider using your/third-party's custom image with the git-lfs installed.
Background #1
The option lfs: true is only for the file download but not the command installation. So you need to install the git-lfs command to the build environment.
Background #2
As described in Issue #1587 · git-lfs/git-lfs, Debian-based distributors don't contain git-lfs package as default. You need to add the apt source manually.
K. Yamamoto
Technical Support Engineer
Atlassian, K.K.
Yokohama, Japan
10 accepted answers
0 comments