A custom transfer agent for git-lfs that uses scp to transfer files.
This transfer agent makes it possible to use git-lfs in situations where the remote only speaks ssh.
This is useful if you do not want to install a git-lfs server.
Configure your local git repository as follows
$ git config lfs.standalonetransferagent scp # <1>
$ git config lfs.customtransfer.scp.path git-lfs-agent-scp # <2>
$ git config lfs.customtransfer.scp.args $DESTINATION # <3>- tell
git-lfsto use the transfer agent named "scp" - tell
git-lfswhat the name of the program is of the transfer agent $DESTINATIONis the destination to whichscpwill copy files tracked bygit-lfswhen running$ git pulland the place it will store files when running$ git push
- NOTE:
$DESTINATIONcan be set to anythingscpunderstands. As an example,server.example.com:/home/git/my-lfs-filesships files to a remote server overssh.
Download pre-built executable binary from Releases page (unzip it and move to /usr/local/bin or C:¥Windows¥System32).
Clone the source and run:
$ cargo build --release # just build
$ cargo install --path . # build and install- from mac (arm64), build mac x64
$ rustup target add x86_64-apple-darwin
$ cargo build --release --target=x86_64-apple-darwin
# aarch64
# rustup target add aarch64-apple-darwin
# cargo build --release --target=aarch64-apple-darwin- from mac, build linux
see rust-lang/rust#34282 (comment)
$ brew tap SergioBenitez/osxct
$ brew install x86_64-unknown-linux-gnu
$ brew tap messense/macos-cross-toolchains
$ brew install aarch64-unknown-linux-gnu
$ rustup target add x86_64-unknown-linux-gnu
$ rustup target add aarch64-unknown-linux-gnu
$ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc cargo build --release --target=x86_64-unknown-linux-gnu
$ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-unknown-linux-gnu-gcc cargo build --release --target=aarch64-unknown-linux-gnu- from mac, build windows
$ brew install mingw-w64
$ rustup target add x86_64-pc-windows-gnu
$ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-w64-mingw32-gcc cargo build --release --target=x86_64-pc-windows-gnuThis project was created with fork from https://github.com/tdons/git-lfs-agent-scp