Skip to content

Support git-lfs files in GitLab Pages

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Description

GitLab allows storing large files with git-lfs but the files do not appear to be available in a GitLab Pages site. Instead the git-lfs metadata for the file is shown at the URL where the actual file is expected.

Perhaps it is intended not to allow large files to be hosted on GitLab Pages, which would be understandable, though a shame. I could not find this issue mentioned elsewhere and I do not know if there is a workaround, e.g. appending the checksum from the metadata to an endpoint on the GitLab server.

My particular use case is to embed an mp4 video into a page. I could add the video to the repo without git-lfs, but it seemed more appropriate to use git-lfs.

Proposal

Files under git-lfs in a Pages branch should be transparently served at the expected URL for the file. GitLab projects marked "private" would see the same behaviour.

Links / references

Edited by 🤖 GitLab Bot 🤖