Show HN: GitDelivr: A free CDN for Git clones built on Cloudflare Workers and R2

  • Posted 7 hours ago by emirb
  • 1 points
https://gitdelivr.net/
Hey HN...I built a free CDN to solve a real problem of slow or expensive git traffic. You just prefix a repo URL:

    git clone --depth=1 https://gitdelivr.net/github.com/torvalds/linux
and you get it served from Cloudflare edge servers closest to you, cached in Cloudflare's object storage (R2).

The idea came from reading that GNOME had to redirect git clone traffic to GitHub mirrors because their GitLab bandwidth bill [1]. As a long time open source contributor and FOSS mirror hoster myself, it seemed surprising that this is a thing in 2026. We have jsDelivr for npm, and CDNs for Docker images and ML, but GNOME out of all projects has to move to use GitHub as a mirror.

Technically Git makes this surprisingly natural to cache as the same clone request produces the same packfile, so in my Workers code I hash the request body and use that as the cache key from R2. Refs get a short TTL of 60s.

The nice thing is you don't have to trust the proxy (I know the first question might be how do we trust you?) because git itself verifies every object hash client-side. And the source code is available on GitHub [2]. It's very light and turned out to be a weekend side project to help not just GNOME but anyone either facing a) egress bills b) not willing to move to GitHub or GitLab SaaS due to costs. It's 2026 so nobody should pay for egress if we have nice things like Cloudflare Workers + R2 :)

There's also support for Git LFS. Total cost to run is about $5/month.

I tested it with a dozen of different Git remotes: GitHub and GitLab of course but also, Codeberg, Gitea, and a few self-hosted instances.

This is meant to be used on public repos only, so private repos don't work but you can take the source code and adjust it and deploy it yourself.

If nobody uses it, it was a still fun project to see how far I can push Cloudflare's offerings. (long-time customer, but haven't really played around with Workers)

[1]: https://www.phoronix.com/news/GNOME-GitHub-GitLab-Redirect [2] https://github.com/emirb/gitdelivr.net

2 comments

    Loading..
    Loading..