Giter Site home page Giter Site logo

git-lfs-server's Introduction

Git LFS server

Project frozen Project unmaintained Build Status Coverage Status

Simple HTTP(S) server for Git Large File Storage with PAM authentication.

$ ./lfs_server.sh -help
Start Git LFS server

  lfs_server [ROOT]

=== flags ===

  [-cert file]    File of certificate for https
  [-key file]     File of private key for https
  [-p port]       TCP port to listen on
  [-pam service]  PAM service name for user authentication
  [-s address]    IP address to listen on
  [-verbose]      Verbose logging
  [-build-info]   print info about this build and exit
  [-version]      print the version of this build and exit
  [-help]         print this help text and exit
                  (alias: -?)

By default, it starts on http://localhost:8080 and treats current directory as ROOT. All object files are stored locally in ROOT/.lfs/objects directory.

INSTALL

From binary packages:

RUN

HTTP server without authentication

./lfs_server.sh -verbose -s IP_ADDRESS -p PORT

A server will ignore credentials passed by LFS client, and accept all connections. To enable authentication, you need to specify PAM service.

HTTP server with PAM authentication

./lfs_server.sh -verbose -pam login -s IP_ADDRESS -p PORT

It will use built-in login PAM service defined in /etc/pam.d/login file.

Warning: LFS client uses HTTP basic authentication, so using HTTPS is a must!

HTTPS server with PAM authentication

./lfs_server.sh -verbose -pam login -s IP_ADDRESS -p PORT -cert domain.crt -key domain.key

Example

Download and install the LFS server as described above. You will also need to install the GIT LFS client.

# Start a LFS server
./lfs_server.sh

# Clone a repo
git clone ....
cd repo

# Add a normal file
touch test.txt
git add test.txt
git commit -m "normal file"

# Add a lfs file 
git lfs install
dd if=/dev/zero of=test.bin count=10240 bs=1024   # Create a file which is 10MB
git lfs track test.bin
git add .gitattributes test.bin
git commit -m "lfs file"

# Configure lfs remote to local server
git config -f .lfsconfig lfs.url http://localhost:8080
git add .lfsconfig
git commit -m "lfs config"

# Push changes
git push

TODO

  • Multi server support
  • Create OPAM package
  • Add max file size option
  • Add connection timeouts
  • Authentication
  • Automated tests
  • Setup Travis continuous builds
  • Setup Coverals
  • Remove incomplete/broken temporary files
  • Upload validation (calculate SHA-256 digest)
  • Reject uppercase SHA-256 hex digests
  • Fix HTTPS urls
  • Rearrange files in release package and remove redundant libs
  • Add logging
  • Check SIGQUIT and SIGINT are handled correctly
  • HTTPS support (trivial to add)
  • Speed-up uploading (fixed in cohttp, see #330)

git-lfs-server's People

Contributors

artemkin avatar joshlk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.