Ask HN: Is anyone using any headless Git service?

4 points by Existenceblinks ↗ HN
Basically an api server for git, like Github API without public facing stuff (also excluding endpoints for its public facing stuff like issues/pull requests etc), only git related endpoints.

I believe there should be at least one .. but I didn't find any. Only found self-hosted git even though some have api.

So I think you know what I mean by "headless".

11 comments

[ 3.2 ms ] story [ 41.2 ms ] thread
Not sure if it's what you're looking for but I self host gitolite on a VPS. Access and auth control is via ssh keys on its user on the server and its script there. Administration is via a git push. There are only git repos, no GUI. Git is the API.
I just look into the gitolite but it doesn't have API. To clarify, what I mean is REST style API via http.
Does git actually let you push over http? I'd imagine that's the same as using ssh/sftp just with WebDAV. If it's the same just create a bare repo in a directory your web server has access to.
I haven't looked into it but I don't think it's enough to build app on top. Otherwise there wouldn't be a bunch of libgit2 binding. Github is basically building around libgit2 (Rugged) and some of its custom stuff + collaboration UI. It's quite surprising no one has ever built libgit2 as a api service .. yet.
So maybe Gitea is what you are looking for. It can be self hosted and they have an API. Links to the documentation from here

https://docs.gitea.io/en-us/api-usage/

It's not headless but maybe there is a way to shut down the HTML interface. But probably the same could be said of GitLab.

Something like the Gitea API? https://try.gitea.io/api/swagger

I don't know if you can run it purely headless.

I actually don't see what's special with that compared to any other API. Here's the analogous endpoint from the Gitea API docs: https://try.gitea.io/api/swagger#/repository/GetTree
True. Though I mean it's not specially git api. There are just a few endpoints. And somewhat tie to the service's db such as branch. It's like a afterthought of ui centric.
ssh myserver -c “git init” && git remote add origin git@myserver && git push origin HEAD.

headless git is just ssh to a sever with an associated repository, ya?

What else do you need?