[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80503":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":15,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":10,"pushedAt":10,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":16,"starSnapshotCount":16,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},80503,"gitgres","calebwin\u002Fgitgres","calebwin","A private GitHub on Postgres","https:\u002F\u002Fgithub.com\u002Fcalebwin\u002Fgitgres",null,"Rust",88,3,87,1,0,38.91,false,"main",true,[],"2026-06-12 04:01:28","\u003Cp align=\"left\">\u003Cimg src=\"res\u002Flogo.png\" alt=\"GitGres\" height=\"160\">\u003C\u002Fp>\n\nGitGres is a starting point for private reimplementations of GitHub optimizied for individual teams' agent needs. GitHub is a fantastic site for sharing code and it is likely how you're viewing this if you're a human. GitGres exists to solve for a few issues:\n\n* **Trading off cost for uptime.** GitHub offers free code storage but less-than-stellar uptime. With GitGres, you have the flexibility to use a Postgres DBMS with tiered storage [1] to tune cost while maintaining uptime.\n* **Trading off latency for cost.** GitHub puts you at the mercy of current system load. With GitGres, just choose your favorite Postgres cache [2].\n* **Trading off consistency for throughput.** GitHub is a cloud service. If requests reach GitHub's servers out of order, bad things can happen. GitGres is a server backed by Postgres. It can run locally. It can run colocated with many agents. Consistency and throughput are fully tunable.\n\nEverything - git objects, refs, packfiles, deltas, tokens, PRs, issues,\ncomments, reviews, reactions, teams, orgs, events - lives in Postgres rows.\nThe server holds nothing on disk.\n\n### Setup\n\n```bash\n# 1. Build (binaries land in .\u002Ftarget\u002Frelease\u002F{gitgres,git-remote-gitgres,gitgres-server}).\ncargo build --release --bins\n\n# 2. Have a Postgres reachable. e.g.\nexport GITGRES_DB='host=localhost user=postgres dbname=gitgres'\n\n# 3. Apply the schema (idempotent).\ngitgres init\n\n# 4. Boot the server. The first --bootstrap-token mints an admin token tied\n#    to user 'demo' that you can use to manage everything else through the API.\ngitgres serve --listen 0.0.0.0:8080 --bootstrap-token \"$(openssl rand -hex 32)\"\n\n# (For TLS:)\ngitgres serve --listen 0.0.0.0:8443 \\\n              --tls \u002Fpath\u002Fcert.pem \u002Fpath\u002Fkey.pem \\\n              --bootstrap-token TOKEN\n```\n\n`gitgres serve` env vars:\n\n| Var | Default | Purpose |\n|---|---|---|\n| `GITGRES_DB` | — | Postgres conn string if `--db` not given |\n| `GITGRES_PUBLIC_URL` | `https:\u002F\u002Fgitgres.local` | Base URL the API returns in `Repository.cloneUrl` |\n| `GITGRES_WORKERS` | `8` | HTTP worker threads |\n| `GITGRES_GQL_LOG` | unset | If set, logs every GraphQL request body to stderr |\n\n### Usage\n\n**Plain `git`** (smart HTTP, v1 + v2):\n```bash\ngit clone http:\u002F\u002Fgitgres.host\u002Fowner\u002Frepo.git\ngit push http:\u002F\u002Fdemo:TOKEN@gitgres.host\u002Fowner\u002Frepo.git main\n```\n\n**`gh` CLI**:\n```bash\n# Print a hosts.yml entry, drop into ~\u002F.config\u002Fgh\u002Fhosts.yml:\ngitgres gh-config --host gitgres.host --token TOKEN --user alice\n\n# Or pipe a token into gh:\necho \"TOKEN\" | gh auth login --hostname gitgres.host --with-token\n\ngh pr create \u002F list \u002F view \u002F merge \u002F comment \u002F close \u002F diff\ngh issue create \u002F list \u002F view \u002F comment \u002F close\ngh repo create \u002F view \u002F clone \u002F fork \u002F list\ngh release create \u002F list \u002F view\ngh label create \u002F list \u002F edit \u002F delete\ngh api \u002Frepos\u002Fowner\u002Frepo\u002F...   # the entire REST surface\n```\n\n**Custom remote helper** (alternative to smart HTTP, also works):\n```bash\ngit clone \"gitgres::host=db.local user=u dbname=gitgres#owner\u002Frepo\"\n```\n\n### Limitations\n\nCurrently, GitGres doesn't support search, actions\u002Fworkflows\u002Fruns\u002Fsecrets, SSH transport, webhooks, HTTP\u002F2, web UI.\n\n### Citations\n\n[1] https:\u002F\u002Fwww.alibabacloud.com\u002Fhelp\u002Fen\u002Fpolardb\u002Fpolardb-for-postgresql\u002Fcold-data-archiving\u002F\n\n[2] https:\u002F\u002Fwww.pgcache.com\u002F\n","GitGres 是一个基于Postgres的私有GitHub实现，专为团队内部需求优化。该项目使用Rust语言开发，将所有git对象、引用、包文件、增量、令牌、PRs、问题等数据存储在Postgres表中，不依赖磁盘存储。它通过提供灵活的成本-可用性、延迟-成本和一致性-吞吐量调整选项来解决标准GitHub服务中的几个关键问题。例如，用户可以通过选择不同的Postgres缓存方案来优化性能与成本之间的平衡。此外，由于其本地或同地部署的能力，GitGres能够更好地保证数据的一致性和处理能力。适用于需要更高自定义水平及控制度的企业或个人开发者环境。",2,"2026-06-11 04:01:01","CREATED_QUERY"]