explaingit

cjb/gittorrent

4,762JavaScriptAudience · researcherComplexity · 4/5LicenseSetup · hard

TLDR

A proof-of-concept that lets you clone and share Git repositories peer-to-peer using BitTorrent and a distributed hash table, with no central server like GitHub required.

Mindmap

mindmap
  root((gittorrent))
    What it does
      P2P repo sharing
      Serverless cloning
      Username registry
    Technologies
      BitTorrent transfer
      DHT peer lookup
      Bitcoin blockchain
    How to use
      npm install
      gittorrent URL format
      Run local daemon
    Status
      Proof of concept
      Unmaintained
      Research artifact
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Explore how decentralized code hosting could work using BitTorrent and DHT without a central server.

USE CASE 2

Clone a Git repository from a peer-to-peer network using the gittorrent:// URL format.

USE CASE 3

Study how Bitcoin's blockchain can map human-readable usernames to cryptographic keys for decentralized identity.

Tech stack

JavaScriptNode.jsnpmBitTorrentBitcoin

Getting it running

Difficulty · hard Time to first run · 1day+

Bitcoin username registration was not operational on the live network at the time of writing, project is unmaintained and some features may not work.

MIT license, use freely for any purpose including commercial projects, with the copyright notice kept.

In plain English

GitTorrent is a proof-of-concept project that lets people share and download Git repositories through a peer-to-peer network instead of relying on a central server like GitHub. The idea is that once a repository is shared on the network, anyone can download it directly from other users who already have it, without going through a single company's servers. The project works by combining several technologies. BitTorrent handles the actual file transfer between peers. A distributed hash table, which is a way for computers on a network to store and look up information without a central database, keeps track of which peers can provide which repositories. Bitcoin's blockchain is used to register human-readable usernames, mapping them to cryptographic keys so you can find a person's repositories by name rather than by a long hex string. To use it, you install the package via npm, then clone repositories using a special URL format that starts with gittorrent:// instead of the usual https://. You can also serve your own repositories to the network by running a small background daemon. The tool integrates with Git's own network layer, so standard Git commands still work behind the scenes. At the time the README was written, the Bitcoin username feature was not yet fully operational on the live network because it depended on a change to Bitcoin Core that had not yet shipped. Until that change landed, registrations used the Bitcoin test network and would not carry over. The project was described as an experiment and welcomed contributions, including changes to its overall design. It is MIT-licensed and was created by Chris Ball. The repository has not been actively maintained in some years, so it is more of a research artifact than a production-ready tool.

Copy-paste prompts

Prompt 1
Based on gittorrent's architecture, explain how BitTorrent and a distributed hash table distribute Git repository data without a central server.
Prompt 2
Help me set up gittorrent locally, serve a repository to the network, and clone it from a second machine using the gittorrent:// URL.
Prompt 3
Explain how gittorrent uses the Bitcoin blockchain to register usernames and map them to repository owners' cryptographic keys.
Open on GitHub → Explain another repo

← cjb on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.