This is a git lfs custom transfer agent for Synology File Station. See this page for documentation on the expected communication protocol. An additional resource for understanding a git lfs custom agent is lfs-dal
on GitHub.
brew install cmake
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt-get install -y libdbus-1-dev pkg-config curl
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
brew install git-lfs
sudo apt-get install git-lfs
Download the most recent release and ensure the binary is on your path. We have provided install scripts for simplicity.
These install scripts install git-lfs-synology
globally. This will impact all git repos on your system. Please install manually if this is something that you need to avoid.
Please install this using PowerShell as your user. Do NOT execute this from an admin shell.
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression (Invoke-WebRequest https://raw.githubusercontent.com/UCSD-E4E/git-lfs-synology/refs/heads/main/scripts/install.ps1?bust=$((Get-Date).Ticks)).Content; Invoke-InstallScript
Install all the development dependencies and then execute the following.
cargo install --git https://github.com/UCSD-E4E/git-lfs-synology.git git-lfs-synology --branch main
cargo uninstall git-lfs-synology
It is necessary for you to provide git-lfs-synology
your username and password. It stores your username and password in your operating system's keyring. To store your username and password, perform these steps.
git-lfs-synology login --url https://e4e-nas.ucsd.edu:6021 --user <username> # Ensure you update your username
Run these steps to update your git config globally. You may not want to perform these if you use other Git LFS implementations.
git config --global lfs.standalonetransferagent git-lfs-synology
git config --global lfs.customtransfer.git-lfs-synology.path `which git-lfs-synology`
Run these steps locally within the repository you want to setup Git LFS Synology in if you don't want to update your global git settings.
git config lfs.standalonetransferagent git-lfs-synology
git config lfs.customtransfer.git-lfs-synology.path `which git-lfs-synology`
cd repo
git lfs install --local
git config -f .lfsconfig lfs.url filestation-secure://e4e-nas.ucsd.edu:6021/<share-name>/git-lfs/<repo-name> # Ensure that you update <share-name> and <repo-name>.
# Ensure that you have followed the steps in "the Configuring Git LFS" section.
git lfs track *.EXT # Replace *.EXT with the objects you want git lfs to track.
git clone https://example.com/git/repo
cd repo
git lfs install --local
# Ensure that you have followed the steps in "the Configuring Git LFS" section.
git lfs pull