I\'ve a repository hosted on VSTS, containig a file stored through git-lfs. If I just let VSTS build checkout the repository it just downloads the git-lfs metadata file cont
For TFS Build 2015 Update 4 (the self-hosted flavor of this thing, as opposed to VSTS, the cloud service), the "Checkout files from LFS" option does not exist, and as such, we had to do this:
Allow Scripts to Access OAuth Token on the Options tab.Commit this batch file into the repository somewhere:
REM This script is intended to fetch large (LFS) files during the TFS Build process.
REM Solution derived from https://github.com/Microsoft/vsts-agent/issues/1134
git config --unset-all http.extraheader
git config --add http.extraheader "AUTHORIZATION: bearer %SYSTEM_ACCESSTOKEN%"
git lfs fetch
git lfs checkout
git config --unset http.extraheader
Add a build step of a Batch Script, and run the above script.