Basic git clone over gemini:// working

Dave Huseby dwh at
Wed May 13 00:25:52 BST 2020

So it does rely on the query parameters feature of Gemini urls but I supposed a gopher equivalent would be to encode the git command parameters as parts of the path just like how the document type is sometimes encoded as part of the url path.

Git is actually pretty modular and is easily adapted to new transport protocols. You just have to implement a "remote helper" binary that follows Git's pipe-fork API for remotes. It's documented in the Git documentation and there's article written about implementing them.

I wrote the absolutely bare minimum remote helper. And since Gemini is a read-only protocol, `git push` will never work. This is just useful for publishing git repos on Gemini sites. The server side could easily be added to the Gemini servers that support CGI scripts.


On Tue, May 12, 2020, at 11:13 AM, solderpunk wrote:
> Holy heck!  That is impressive and exciting.  I know essentially nothing
> about git internals.  To what extent does doing this rely on features of
> Gemini which have no equivalent in Gopher?  Or is this actually much
> simpler than I'm imagining it?
> Cheers,
> Solderpunk
> On Mon, May 11, 2020 at 06:32:45PM -0700, Dave Huseby wrote:
> > Howdy,
> > 
> > I got bored over the weekend and wrote a simple Git remote helper for the gemini protocol. I published it on github for now:  Once you have it built and installed in your PATH somewhere, you'll then be able to clone it from the its actual location here: gemini://
> > 
> > I did a short terminal capture of me cloning a repo over gemini:
> > 
> > To make this work, I had to hack up Pollux to respond to simple queries and run the appropriate Git commands on the server. The details are in the README.gemini file in the repo.
> > 
> > Cheers!
> > Dave

More information about the Gemini mailing list