Fig

Fig serves Git repositories over HTTP and provides a web interface for browsing repositories.

What This Is

Fig is a self-hosted Git backend that provides:

  • Git HTTP Backend: Host Git repositories over HTTP with support for clone, fetch, and push operations
  • Web UI: Browse namespaces, repositories, commits, and README files through a clean web interface

Features

Git Backend

  • Clone and fetch repositories (public read access)
  • Push to repositories (authenticated write access)
  • Per-namespace access control

Git Backend Documentation

Web UI

  • Browse all namespaces with search
  • View repositories within a namespace with last commit info
  • View repository details including commit history and rendered README
  • Create repositories through web forms
  • User authentication with session-based login

UI Documentation

Quick Start

Deploy with the [once project] (https://github.com/basecamp/once) Be sure to set follwoing environment variables:

DB_PATH=/storage/<your_choice> PROJECT_ROOT=/storage/<your_choice>

Documentation

DocumentDescription
Git BackendGit HTTP backend usage and workflows
UI DocumentationWeb interface guide and page descriptions
Environment VariablesConfiguration options reference

Authentication Overview

Fig uses multiple authentication methods depending on the action:

ActionAuthentication Method
Generate signup ticketAPI Key (admin only)
Create accountSingle-use ticket
Log in (UI)Form submission → sets session cookie
Create namespacesession cookie (UI)
Create repositoryBasic Auth
Git clone/fetchNone (public read)
Git pushBasic Auth via git
Log outsession cookie

Registration Flow

  1. Admin generates a signup ticket using the API Key
  2. User creates an account with the ticket (single-use, consumed on signup)
  3. User logs in
  4. User can now create namespaces and repositories

See the individual documentation files for detailed authentication flows.