objgit README

The project's README from github.com/tigrisdata/objgit. As one markdown file: README.md.

objgit

An experiment in storing git repositories in object storage. You probably don't need this. This is a proof of concept and doesn't really have a lot of uses yet.

This is heavily vibe coded as an exploration of the design space. See the claude plans folder for an idea of the kinds of things that were being explored and why. If this experiment ends up being shippable, a better implementation will be made to replace this terrible code.

License: MIT

Price: Free as in mattress. If you use this, it's your problem.

Notable features

Design tradeoffs

Future goals

Setup instructions

objgit depends on the following things:

Prepare your .env file

objgit takes its configuration via flags, environment variables, and .env files in this order of precedence:

Here is a sample .env file:

# Use the AWS credential chain to load Tigris credentials
AWS_PROFILE=tigris

# If true, allow the execution of post-receive hooks
ALLOW_HOOKS=true
# Hook timeout in go time.Duration format
HOOK_TIMEOUT=60s

# If true, allow anonymous pushes
ALLOW_PUSH=true

# The Tigris bucket that all repos are stored in,
# as well as the SSH host key
BUCKET=xe-git-repos

# Per-protocol bindhosts
GIT_BIND=:9418
HTTP_BIND=:8080
SSH_BIND=:2222

# Pushes that unpack a packfile at the same time. This is what bounds
# memory under concurrent pushes: each one costs roughly 400 MiB of
# resident set for a large repository. 0 disables the limit.
MAX_CONCURRENT_PUSHES=4
# How long a push waits for a slot before it fails,
# in go time.Duration format
PUSH_QUEUE_TIMEOUT=2m

# Prometheus metrics
METRICS_BIND=:9090

# Logging detail level
SLOG_LEVEL=INFO

Run the program

go run ./cmd/objgitd

Push a repo

$ git push ssh://localhost:2222/xeiaso.net/objgit.git
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 32 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 2.80 KiB | 2.80 MiB/s, done.
Total 9 (delta 5), reused 0 (delta 0), pack-reused 0 (from 0)
remote: push to xeiaso.net/objgit.git refs/heads/main: a300ea49df20ad5dc82fc4dabb85fbd3261faed7 -> 3d889908eefd60d9a11605f077b7b4560aef8e74
remote: top-level contents:
remote: CLAUDE.md
remote: LICENSE
remote: README.md
remote: cmd
remote: docs
remote: go.mod
remote: go.sum
remote: internal
remote: go module: tangled.org/xeiaso.net/objgit
remote: manifest (/tmp/manifest.txt):
remote: ref refs/heads/main
remote: sha 3d889908eefd60d9a11605f077b7b4560aef8e74
remote: hook done
To ssh://localhost:2222/xeiaso.net/objgit.git
   a300ea4..3d88990  main -> main

Deployment to production

TODO(Xe): re-evaluate performance-based life choices and write.

objgit (tigrisdata/objgit)

Searching Database…

141 ·GitHub
Что это такое?objgit — это эксперимент: Git-сервер, который хранит репозитории не на локальном диске, а в объектном хранилище (Tigris). Автор называет его proof of concept, который вам, скорее всего, пока не нужен.
Это новая система контроля версий или сервер для обычных Git-репозиториев?Это сервер, а не новая VCS — репозитории остаются обычными Git, хранятся в формате bare repo внутри бакета и раздаются по ssh, http и протоколу git.
Как его запустить?Получите аккаунт, бакет и пару ключей доступа в Tigris, положите конфигурацию в файл .env (переменные окружения имеют приоритет над .env, а .env — над флагами), затем запустите программу и запушьте репозиторий.
Можно ли указать на любой бакет, совместимый с S3, или нужен именно Tigris?Нужен именно Tigris: основной сценарий работы опирается на вызов Tigris RenameObject, которого нет в стандартном S3 API. Также нужна система с установленным Go, центры сертификации TLS на диске и сетевой стек IPv4/IPv6.
А чего в нём не хватает, чтобы действительно на него положиться?Довольно многого: аутентификации нет вообще, чтение полностью буферизуется в памяти (теоретический лимит размера файла — 2 Ги), объектное хранилище медленнее локального диска, а сам автор говорит, что проект совсем новый и почти не тестировался.
Почему автор сделал это, вместо того чтобы просто поднять обычный Git-сервер?В README сказано, что это сильно vibe coded — исследование пространства решений, причём папка claude plans документирует, что именно исследовалось и почему. Если эксперимент окажется жизнеспособным, текущий код должен заменить более качественная реализация.
Что в планах на будущее?В планы входят интеграция с Tekton для CI-пайплайнов, веб-интерфейс на основе Xe Design System, развёртывание в Kubernetes, поддержка HTTPS с терминацией TLS и пост в блоге.
Есть ли какие-нибудь метрики для мониторинга?Да, базовые метрики Prometheus встроены из коробки.
What are similar projects?minio, thanos, git-ai, walgithub, walgit, kubo, crab, sftpgo
Creator
tigrisdata
Size
1.5 MB
Stars
141
Age
4mo
Commits · 90 Days