logoalt Hacker News

Show HN: My Private GitHub on Postgres

32 pointsby calebhwintoday at 5:40 PM17 commentsview on HN

Comments

hk1337today at 6:24 PM

Interesting idea but what's the use case for this? Why wouldn't I just create a private git server (gitlab, forgejo, etc) just for myself?

show 3 replies
xp84today at 6:46 PM

"doesn't support: ... Web UI."

So, it's a git server with an interesting storage layer? Don't get me wrong, that part sounds like it might have been a ton of work to implement, but I think the web UI (pull requests, etc) is a lot of what Github has won on historically.

Basically I don't feel qualified to judge the product itself, but I think positioning it against Github, while popular given the recent hard times, isn't quite correct.

show 1 reply
supriyo-biswastoday at 7:48 PM

I've always wanted to write something like this. The problem with Gitlab/Gitea etc. is their reliance on disk storage; which means self hosting them requires that I get the backup story just right. Whereas with this, I could just handle it as part of the database backup process.

Having no web UI, at least even a rudimentary one is kinda a bummer though.

show 1 reply
lisperforlifetoday at 7:08 PM

This is really cool. PG has zlib compression on TOAST objects so this should still be okay even if you are not storing pack files. I am curious with your choice of hand-rolling pktline, upload-pack and receive pack implementations including rev-walking. Any particular reason you did not want to use libgit2 or something like the gitoxide implementation of pkt-line. Was it performance or is it because you wanted it to be in pure rust? Did you try running this on slightly heavier repository with a lot of commits, refs and objects?

throwatdem12311today at 6:37 PM

Just use Fossil at this point.

show 2 replies
bitbashertoday at 7:24 PM

No license?

iririririrtoday at 7:04 PM

just use ssh and git bare.

JasonHEINtoday at 6:53 PM

Great idea

Mic92today at 5:52 PM

Nice idea.

vishal_chtoday at 5:51 PM

Interesting approach using Postgres as the storage layer. Curious how you're handling the object model since Git's content-addressable storage maps pretty differently to relational tables. Are you storing blobs as bytea or going with something like a JSONB tree structure for the commit graph?

show 1 reply