• This repository has been archived on 21/Nov/2018
  • Stars
    star
    216
  • Rank 183,179 (Top 4 %)
  • Language
    Ruby
  • Created over 9 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Git LFS server that uses S3 as the storage backend.

Git LFS S3

A Git LFS server that stores your large Git files on S3.

It works by generating a presigned URL that the Git LFS client can use to upload directly to S3. It also provides download URLs that allow Git clients to download directly from S3. No data is proxied through the Git LFS server.

Installation

Git LFS S3 is available on RubyGems.

gem install git-lfs-s3

Or add it to your Gemfile if you wish to bundle it as a part of another application.

gem 'git-lfs-s3'

Configuration

Standalone

All configuration is done via environment variables. All of these configuration variables must be set.

  • AWS_REGION - the region where your S3 bucket is.
  • AWS_ACCESS_KEY_ID - your AWS access key.
  • AWS_SECRET_ACCESS_KEY - your AWS secret key.
  • S3_BUCKET - the bucket you wish to use for LFS storage. While not required, I recommend using a dedicated bucket for this.
  • LFS_SERVER_URL - the URL where this server can be reached; needed to fetch download URLs.

You can (and should) also set authentication information. When you push for the first time from git, you will be prompted to enter a username and password when authentication is enabled. You can configure these with environment variables as well.

  • USERNAME - the login username.
  • PASSWORD - the login password.

Bundled

If you are bundling the service inside of another application, such as Rails, or a different server of your choosing, you can set the configuration directly on GitLfsS3::Application. See bin/git-lfs-s3 for an example.

You can also hook the authentication into your own service this way. For example:

GitLfsS3::Application.on_authenticate do |username, password|
  user = User.find(username: username)
  user.verify_password(password)
end

The logger can be configured as well. This is especially handy if you want to hook it into your Rails logger:

GitLfsS3::Application.set :logger, Rails.logger

Git Setup

If you are new to Git LFS, make sure you read the Getting Started guide first. Once that's done, you can configure your Git client to use this server by creating a .gitconfig file in the root of your repository and adding this config, but with your server address:

[lfs]
    url = "http://yourserver.com"

Once that is done, you can tell Git LFS to track files with git lfs track "*.psd", for example.

Running

This repository contains an executable that will run a basic WEBrick server. Since this service is so lightweight, that's likely all you'll need. The port will default to 8080, but can be configured with an environment variable.

PORT=4000 git-lfs-s3

However, because this is a Sinatra application, it can also be mounted within other Rack based projects or other Rack-based servers such as Unicorn or Puma. For example, if you wanted to add this to your Rails project, configure GitLfsS3 in an initializer, and add this your routes:

mount GitLfsS3::Application => '/lfs'

TODO

  • Cloudfront support

More Repositories

1

CamanJS

Javascript HTML5 (Ca)nvas (Man)ipulation
HTML
3,551
star
2

psd.js

A Photoshop PSD file parser for NodeJS and browsers
CoffeeScript
2,720
star
3

CoffeeDrop

CoffeeDrop is an open-source, roll your own, Dropbox-like clone written in CoffeeScript. Currently not working and under heavy development.
CoffeeScript
509
star
4

ajax-chosen

A complement to the jQuery library Chosen that adds ajax autocomplete
CoffeeScript
409
star
5

flickr-store

Store arbitrary data on Flickr
Ruby
275
star
6

CamanJS-Plugins

Plugins for CamanJS, a Javascript image manipulation library
CoffeeScript
195
star
7

RubyDrop

A roll your own Dropbox-like clone written in Ruby.
Ruby
127
star
8

nanocrawler

Web-based front end for viewing information about your Nano node and exploring the Nano network
JavaScript
83
star
9

CamanJS-Site

CamanJS Homepage
JavaScript
66
star
10

node-activerecord

A ORM written in Coffeescript that supports multiple database systems (SQL/NoSQL) and ID generation middleware.
CoffeeScript
58
star
11

JSONP-Fu

A Javascript library that provides access to multiple JSONP API's through a unified, extensible, and easy to use interface.
JavaScript
27
star
12

node-iracing

iRacing SDK bindings for NodeJS
C++
22
star
13

png-encode

Encode/decode arbitrary files using the PNG file format
Ruby
14
star
14

coffeescript-module

A base class for your Coffeescript projects
CoffeeScript
14
star
15

bindata.js

A structured and understandable way to read/write binary data in Javascript. Inspired by Ruby BinData.
CoffeeScript
10
star
16

Osimo-BBCode-Editor

An easy to use jQuery plugin BBCode editor
JavaScript
9
star
17

CamanJ

Java port of the CamanJS image manipulation library
Java
8
star
18

CamanDrop

Easy and automatic image filters using CamanJS, watch folders, and NodeJS.
JavaScript
7
star
19

NodeMonitor

A distributed server monitoring system written in Javascript for Node.JS that uses WebSockets to show server info in near real-time from the browser.
JavaScript
7
star
20

iracing-websocket-server

A WebSocket based server that streams data from iRacing to the browser.
JavaScript
7
star
21

Asyrch

Asynchronous web searching using web workers and ajax
JavaScript
6
star
22

qr-logo

A simple library for customizing a QR code with a logo.
JavaScript
5
star
23

campfire-notifier

A self-hosted Campfire push notification service
Ruby
4
star
24

wiki-philosophy

How many clicks does it take to get from any word to Philosophy on Wikipedia?
JavaScript
4
star
25

nano-ipc-js

Javascript library for interacting with the Nano node IPC
JavaScript
4
star
26

nano-seeds.lol

A take on keys.lol, but for Nano based currencies
JavaScript
4
star
27

MeltingIce-File-System

An online storage service with support for multiple users, Flash file uploading, and advanced user management. Project is no longer under active development.
PHP
4
star
28

Notetakr

An online note-taking application - no longer hosted, code is for experimentation and learning. This was a very old project of mine and is no longer under development.
JavaScript
3
star
29

TransmissionRemote-Pebble

Check on the status of your Transmission torrents from your Pebble smartwatch
JavaScript
3
star
30

meltingice.github.com

Github homepage
JavaScript
3
star
31

Osimo-BBCode-Parser

The BBCode parser made for Osimo Forum System, but can be used for any project.
PHP
3
star
32

node-memcached

A Node.JS memcached interface
3
star
33

Osimo-Forum-System-v2

Osimo is a forum system written from the ground up to be easy to theme and use.
PHP
3
star
34

Caman-C

C port of the Javascript image manipulation library CamanJS
C
3
star
35

nano-grpc

A gRPC server for the Nano cryptocurrency node
JavaScript
2
star
36

jSearch

A jQuery plugin to search an HTML element for a query and highlight the matches. Also, has a iPhone bookmarklet to search the current page and auto search engine detection.
JavaScript
2
star
37

nanocrawler-phoenix

Elixir/Phoenix based version of Nanocrawler, a Nano network explorer
JavaScript
1
star
38

nano-node-statsd

StatsD data collection for Nano currency nodes
JavaScript
1
star
39

cs-terrain-generator

A fractal terrain generator made especially for Cities: Skylines.
JavaScript
1
star
40

nano-ipc-rest

A simple IPC + REST RPC server for the Nano cryptocurrency node.
JavaScript
1
star
41

poopelo

Checks to see if our neighborhood pool is closed.
JavaScript
1
star
42

Osimo-Forum-System-v1

The old version of the Osimo Forum System that has been migrated to GitHub for archival purposes mostly. Please visit the Osimo Version 2 page to see the latest development!
PHP
1
star
43

Ghetto-FBChat

Back before Facebook supported its chat feature on mobile devices, I began to create a simple website that would allow this functionality without using the Facebook API. Chances are this code doesn't even work anymore, so it's here mostly for viewing pleasure.
JavaScript
1
star
44

deviant

An elasticsearch backed exception logging service
Ruby
1
star