February 8, 2017

Host your own Git LFS with node-lfs-s3

Want to use Git LFS without a Git-as-a-Service provider like GitHub or BitBucket?

Stuff you will need

Things to configure

Your Git repository needs a file called .lfsconfig which points it at the Git LFS server. Here’s an example:

    [lfs]
    url = "http://host:port/github-account-name/repo.git"
    batch = true
    access = basic
    [http]
    sslverify = true

Commands you will run

Start up node-lfs-s3 with a command like this:

FS_BASE_URL=http://host:port/ LFS_PORT=port LFS_STORE_TYPE=s3 LFS_AUTHENTICATOR_TYPE=none LFS_JWT_SECRET=a_secret AWS_ACCESS_KEY=aws_access_key AWS_SECRET_KEY=aws_secret_key LFS_STORE_S3_BUCKET=bucket_name LFS_S3_REGION=us-east-1 node git-lfs-server.js