Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Use git-lfs on atlassian/default-image:2

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.

 

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events