Facing a weird behaviour when we wanted to use git lfs to checkout a repository in a pipeline. When adding the step explicitly to the azure-pipeline.yml
- checkout: self
lfs: true
the pipeline fails with:
git: 'lfs' is not a git command. See 'git --help'.
##[error]Git-lfs installation failed with exit code: 1
Without the explicit checkout step we've seen that git-lfs is actually pre-installed:
Syncing repository: repo-name (Git)
git version
git version 2.27.0
git lfs version
git-lfs/2.11.0 (GitHub; linux amd64; go 1.14.4)
however, it is not performing a git lfs checkout!
We've just figured out that this only happens when setting it additionally in the Edit Pipeline / Trigger > YAML Settings to LFS, refer to picture. This is not really clear for me why the lfs checkout fails when calling it explicitly as it's not installed, but otherwise it is indeed pre-installed, however, will only work if configured in the UI. Did I miss anything?
