Supercharged git-daemon
Over the past several weeks I’ve been working on a secret Erlang project that will allow us to grow GitHub in new and novel ways. The project is called egitd…
Over the past several weeks I’ve been working on a secret Erlang project that will allow us to grow GitHub in new and novel ways. The project is called egitd and is a replacement for the stock git-daemon that ships with git. If you’re not familiar, git-daemon is what has, until today, served all anonymous requests for git repositories. Any time you used a command like git clone git://github.com/user/repo.git
you were being served those files by git-daemon.
The reason we need egitd is for flexibility and power. We need the flexibility to map the repo name that you specify on the command line to any disk location we choose. git-daemon is very strict about the file system mappings that you are allowed to do. We also need it so that we can distinguish and log first-time clones of repos. Keep an eye out (down the road) for statistics that show you exactly how many times your public repo has been cloned!
Another benefit of coding our own git server is enhanced error messages. I can’t even begin to tell you how many people have come to us complaining about the following error which is caused by trying to push to the public clone address:
fatal: The remote end hung up unexpectedly
With egitd we can inject reasonable error responses into the response instead of just closing the connection and leaving the user bewildered. Behold!
fatal: protocol error: expected sha/ref, got ' *********' You can't push to git://github.com/user/repo.git Use git@github.com:user/repo.git *********'
Still a little crufty, but until we can get something useful into core git, it’s the best we can do and should help many people as they learn git and get over some of the confusing aspects.
Written by
Related posts
![](https://github.blog/wp-content/uploads/2024/03/Enterprise-LightMode-1-1.png?resize=400%2C212)
GitHub Availability Report: January 2025
In January, we experienced two incidents that resulted in degraded performance across GitHub services.
![GitHub Copilot agent mode](https://github.blog/wp-content/uploads/2025/02/Agent-Sunrise-1.png?resize=400%2C212)
GitHub Copilot: The agent awakens
Introducing agent mode for GitHub Copilot in VS Code, announcing the general availability of Copilot Edits, and providing a first look at our SWE agent.
![](https://github.blog/wp-content/uploads/2025/01/innovation_graph_1.png?resize=400%2C212)
That’s a wrap: GitHub Innovation Graph in 2024
Discover the latest trends and insights on public software development activity on GitHub with the release of Q2 & Q3 2024 data for the Innovation Graph.