Skip to content
kode-bloxPublic

About

Stateless Git LFS server for GitHub.com and S3-compatible storage

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

GOLFS

GOLFS is a stateless Git LFS server for GitHub.com repositories backed by private Hetzner Object Storage through its S3-compatible API. It authenticates GitHub App users, authorizes repository access, implements the Git LFS Batch and Verify APIs, and returns direct presigned S3 actions. Object bytes never pass through GOLFS.

GOLFS supports the Git LFS Basic Transfer protocol with SHA-256 objects up to 5,000,000,000 bytes. It deliberately excludes a database, multipart uploads, locking, garbage collection, object deletion, administration commands, and automatic fork provisioning.

Documentation

Start with Installation, then Configuration and GitHub App and GCM setup to deploy the server and connect a client.

To understand the system, read Architecture, Security, and Language and foundations. For ongoing work, use Operations, Testing, and Release process. The security policy covers private reporting and supported versions.

Request flow

  1. A Git LFS client sends Basic credentials to the repository-specific Batch endpoint. The password is a GitHub App user access token.
  2. GOLFS proves that the configured App is installed on the repository, that GitHub returned an operator-allowlisted installation ID, that the user token can access that installation, and that the user has the needed repository permission.
  3. GOLFS resolves GitHub's canonical numeric repository ID and checks whether the expected S3 object exists with the requested size.
  4. GOLFS returns a presigned S3 PUT or GET action. Uploads also receive a GOLFS Verify action.
  5. Hetzner enforces the signed SHA-256 payload hash and conditional object creation during upload. GOLFS confirms object existence and size during Verify and every download Batch.

Object keys have the stable form:

github/{numeric-repository-id}/objects/{first-two-oid-characters}/{next-two-oid-characters}/{full-sha256-oid}

API

The public listener serves:

POST /github.com/{owner}/{repository}/info/lfs/objects/batch
POST /github.com/{owner}/{repository}/info/lfs/objects/verify

The cluster-internal operations listener serves:

GET /healthz
GET /readyz
GET /metrics

There are no object proxy or redirect routes. See Architecture, configuration, and operations for the complete contract.

Client setup

Create and install the GitHub App, then configure GCM 2.9.0 or later using the exact commands in GitHub App and GCM setup. Set the repository's LFS URL:

git config --local lfs.url "https://lfs.example.com/github.com/OWNER/REPOSITORY/info/lfs"

No GitHub App client secret is distributed.

Development

Go 1.27.0 is required:

go test ./...
go vet ./...
go build ./cmd/golfs

See Testing for the current automated coverage, CI checks, and manual external-service gates.

Documentation development

Edit pages and sidebar metadata in docs/ and keep static assets in docs/public/. Keep a checkout of kode-blox/website alongside GOLFS and set DOCS_SITE=golfs in the website checkout. Use its Node version and npm commands to preview and validate changes. Website local development

The landing page starts at Installation. Set sidebar groups and page order in docs/meta.json. Keep canonical filenames aligned with page titles, such as security.md for /security and release-process.md for /release-process. Verify behavioral claims against the source and workflows. Keep deployment examples consistent with the chart README.

Keep the Security page's H2 sequence of Protected assets, Trust boundaries, Controls, Accepted limitations, and Further reading. Use a list for protected assets and a table with Boundary and Security requirement columns for trust boundaries. Under Controls, keep the H3 headings Credentials and authorization, Isolation and integrity, and Workloads and networking in that order. Link to the security policy for private reporting and supported versions and to Testing for coverage. Security policy · Testing

Pushes to main that change docs/ ask the website to build GOLFS at the pushed commit. Dispatch Documentation · Website delivery

After changing navigation or content, check internal links, sidebar order, search, and the Markdown outputs in the website export. The Markdown export includes an index at llms.txt, the full corpus at llms-full.txt, and individual pages at llms.mdx/docs/<page>/content.md.

Deployment

A non-root container and Helm chart are included. The chart exposes the public and operations listeners through separate Services and routes only the public Service through the optional Gateway API resources. Follow Installation for prerequisites, HTTPS routing, and acceptance checks. Use the chart README for Secret and chart installation details.

License and provenance

GOLFS is an independent implementation licensed under Apache-2.0. Its protocol and architecture were informed by public Git LFS specifications and an existing Git LFS server, but its source and Git history are independent.

About

Stateless Git LFS server for GitHub.com and S3-compatible storage

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages