Configuring Git LFS for downloading LSST data packages

LSST uses Git LFS to efficiently store large files in Git repositories. Typical Science Pipelines installations, like lsst_distrib, do not require Git LFS. However, some tutorials might require Git LFS to clone a specific Git repository that does use Git LFS. The testdata_ci_hsc package is one example. This page describes how to configure Git LFS to work with LSST’s servers.

Note

LSST staff and contributors should follow the instructions in the Developer Guide, specifically Authenticating for push access,for configuring Git LFS with authenticated (push) access.

Getting Git LFS

Git LFS may have been installed with your LSST Science Pipelines installation.

To check that it’s available, run:

git-lfs version

If it is not installed, or if you want to use it You can also install Git LFS independently of the LSST Science Pipelines.

Follow the instructions on the Git LFS homepage to install Git LFS onto your system, and then the first bullet point in “Getting Started.”

If all you will need to do is to use files that have been stored in Git LFS, and will not need to read them,

git-lfs install

is all you need to do after installing the git lfs binaries. This must be done on each machine from which you will be accessing repositories with Git LFS-stored artifacts.

If all you need is read-only access to LFS-stored files, you’re done. The .gitattributes file will already have been created appropriately in each LFS-using repository.

Try it out

Trying cloning the testdata_decam Git repository to test your configuration:

git clone https://github.com/lsst/testdata_decam.git

Push access

LSST contributors need to follow some extra steps to authenticate commands that push to the upstream repository on GitHub. See Authenticating for push access.