Dealing with Git repositories

Obviously, many developers want to work with the latest version of their dependencies, often the master branch of the Github repository. I don’t think I need to introduce Git to you, the most well-known versioning tool today. Whether we like it or not, it has become ubiquitous.

The two main protocols for Git synchronization are SSH and HTTPS. Unfortunately, Git encapsulates a relatively complex protocol within these, which would be both challenging and unnecessary to implement. The best solution, therefore, is to include a Git client capable of performing the initial synchronization and retrieving updates.

InterDiode only offers a HTTP interface for its clients. Thus, Git clones will need to be done via HTTP. One initial solution was to use the basic clone protocol over HTTP, which is theoretically possible when using Git’s update-server-info command. This command enables cloning by utilizing a simple HTTP server that serves flat files. However, tests conducted with large Git repositories like Linux or Django show that this approach doesn’t work well, as some files don’t seem to be generated correctly. Therefore, it is necessary to revert to good old CGI and use the git-http-backend utility to enable reliable cloning.