AMAZINGINDEX.COM 日报快照
57.4
VOL. 2026.06
2026.06.25
← 返回 2026.06.25 日报
日报快照 · Daily Snapshot
NO. 014

对象存储变 Git 后端

#ARTICLE HackerNews 2026.06.25
推荐指数 62.0 NO. 014 · 2026.06.25
发布2026/06/24Score54Comments11

作者用 billy 文件系统抽象层让 Tigris 对象存储 bucket 充当 Git 服务端,实现纯 Go 的 git 协议处理。这对想自建 Git 托管又不想维护完整文件系统的团队有参考价值。

大多数自托管 Git 的方案要么用 GitLab/Gitea 这种重量级平台,要么直接用裸仓库加 SSH,对象存储当后端一直是空白地带。这个项目的关键洞察是 billy 接口恰好覆盖了 git 操作所需的文件语义,不需要自己造轮子。

但有个明显限制:go-git 不支持部分高级特性如 git LFS 和某些 hooks,生产环境用之前要扫一遍你的团队是否依赖这些。如果你在搞 Serverless Git 托管或者想把代码仓库和 CI 产物存到同一套存储里,这个思路值得 fork 下去改。

正面 11 条评论

核心争论:Git 后端是否必须依赖 POSIX 文件系统,对象存储能否更原生适配

ctoth

Came here for a five-gallon bucket hooked to Dulwich (archiving rain?), Slightly disappointed :) Go Git and Dulwich and friends are indeed fun tech.

Eikon

Most of the pain here is the typical set of issues people run into trying to make S3 a filesystem as-is, common with S3FS-family approaches. ZeroFS (https://github.com/Barre/zerofs) is 9P/NFS/NBD over S3 on an LSM. Point stock go-git, or just /usr/bin/git

xena

Author of the article here. I'm aware of ZeroFS and other similar approaches (such as something internal at Tigris that will become public at a later date), this was more of an experiment to see how far you can get with stuff I already had "on the shelf". I am going to be improving this a fair bit;

替代方案: ZeroFSgit-annexS3FSRedisPostgresIPFSGitea
查看原文 →