https://github.com/saracen/lfscache
LFS Cache is a caching Git LFS proxy.
https://github.com/saracen/lfscache
cache git git-lfs lfs
Last synced: 5 months ago
JSON representation
LFS Cache is a caching Git LFS proxy.
- Host: GitHub
- URL: https://github.com/saracen/lfscache
- Owner: saracen
- License: mit
- Created: 2018-10-23T15:18:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-07-23T00:22:02.000Z (almost 4 years ago)
- Last Synced: 2025-08-14T09:58:29.075Z (10 months ago)
- Topics: cache, git, git-lfs, lfs
- Language: Go
- Size: 37.1 KB
- Stars: 73
- Watchers: 2
- Forks: 27
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lfs-cache
lfs-cache is a caching proxy for [Git LFS](https://git-lfs.github.com/) servers.
## Usage
#### Docker
```
$ docker run --name lfscache --rm -d -v /my/cache/dir/lfs:/lfs saracen/lfscache:latest --url github.com/org/repo.git/info/lfs --http-addr :80 --directory /lfs
```
#### Binary
Download the correct [binary](https://github.com/saracen/lfscache/releases) for your system.
```
$ ./lfscache --url github.com/org/repo.git/info/lfs --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
```