Show HN: My Private GitHub on Postgres
Key takeaways
- Git Gres is a starting point for private reimplementations of Git Hub optimizied for individual teams' agent needs.
- Build (binaries land in ./target/release/{gitgres,git-remote-gitgres,gitgres-server}). cargo build --release --bins # 2.
- git clone http://gitgres.host/owner/repo.git git push http://demo:TOKEN@gitgres.host/owner/repo.git main gh CLI:
Git Gres is a starting point for private reimplementations of Git Hub optimizied for individual teams' agent needs. Git Hub is a fantastic site for sharing code and it is likely how you're viewing this if you're a human. Git Gres exists to solve for a few issues:
Everything - git objects, refs, packfiles, deltas, tokens, PRs, issues, comments, reviews, reactions, teams, orgs, events - lives in Postgres rows. The server holds nothing on disk.
# 1. Build (binaries land in ./target/release/{gitgres,git-remote-gitgres,gitgres-server}). cargo build --release --bins # 2. Have a Postgres reachable. e.g. export GITGRES_DB='host=localhost user=postgres dbname=gitgres' # 3. Apply the schema (idempotent). gitgres init # 4. Boot the server. The first --bootstrap-token mints an admin token tied # to user 'demo' that you can use to manage everything else through the API. gitgres serve --listen 0.0.0.0:8080 --bootstrap-token "$(openssl rand -hex 32)" # (For TLS:) gitgres serve --listen 0.0.0.0:8443 \ --tls /path/cert.pem /path/key.pem \ --bootstrap-token TOKEN gitgres serve env vars: