💾 Archived View for capsule.wetterberg.nu › 2021 › 2021-01-19-gemini-git.gmi captured on 2023-11-14 at 07:42:56. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

Gemini Git

One thing that has been bugging me when I write these posts is that I have to link out to http for everything code-related. I love the simplicity and philosophy of sourcehut, so this is not a knock against it, I just want to be able to show my projects over gemini.

The approach I took with gemini git is quite similar to the gemlog server. The git repo itself becomes the database through the use of the excellent go-git, which I forgot to mention in my dependency wrap-up. Better late than never!

Go-Git

• • •

The flow works something like this: give gemini-git a sourcehut bearer token that has read access to your profile and repositories. It will then fetch information about your public repos and clone them (or fetch if already cloned). At a regular interval (30m default) it will then poll sourcehut to see if the tips of the default branch has changed, if so it will fetch the affected repos again.

The sourcehut metadata and repo contents is then used to give you a basic view of the repositories.

My self-hosted instance

Gemini-git itself