Awesome Open Source
Awesome Open Source


lfs-cache is a caching proxy for Git LFS servers.



$ docker run --name lfscache --rm -d -v /my/cache/dir/lfs:/lfs saracen/lfscache:latest --url --http-addr :80  --directory /lfs


Download the correct binary for your system.

$ ./lfscache --url --directory /my/cache/dir/lfs --http-addr=:9876

--directory specifies the cache directory. The layout is the same used by the Git LFS client, so it might be a good idea to copy over your .git/lfs/objects directory to preload the cache (cp -r .git/lfs/objects /my/cache/dir/lfs). The tmp and incomplete directories do not need to be copied over.

Now you need to have your Git LFS client point to the proxy. There are several ways to do this. The easiest method is changing the lfs url that will be used in your local git config:

# note that repo.git/info/lfs is not required
git config lfs.url http://localhost:9876/

# you can confirm the Endpoint that will be used by running
git lfs env | grep Endpoint

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
go (15,158
git (816
cache (326