Git Repository in ZeroNet

in #zeronet8 years ago (edited)

ZeroNet, a serverless P2P network that uses Bitcoin cryptography and BitTorrent technology, may be the first real, usable prototype of a decentralized web.

BitTorrent users can download files directly from other users, without needing a central server. The BitTorrent technology for distributed file storage and peer-to-peer transfers, one of the biggest developments in Internet technology since the Web itself, opens the way to a distributed, fully decentralized Internet. 

Here's an example how to publish a serverless Git repository: 

Note: Only private key owner can push, sign and publish changes. However other users can clone repositories even if internet connection is offline.

Create a new site as described here

Make a mirror of your existing repository

cd $ZERONET_DIR/data/$SITE_ADDRESS
git clone --mirror $PATH_TO_YOUR_ORIGINAL_REPO

Clone mirrored repository to any other directory

cd $ANYWHERE_YOU_WANT
git clone $ZERONET_DIR/data/$SITE_ADDRESS/$REPO_NAME.git

Set up your post-update hook for "dumb http"

cd $REPO_NAME/hooks
mv post-update.sample post-update

Make any minor change (e.g. add one line to a >>README.md file)

echo "" >>README.md

Commit and push your changes

git commit -a -m "Technical commit"
git push

Sign and publish site changes as described here.

Now you can clone your repository from ZeroNet

git clone http://127.0.0.1:43110/$REPO_NAME.git

Here is a working demo:

Coin Marketplace

STEEM 0.19
TRX 0.12
JST 0.027
BTC 64927.71
ETH 3517.54
USDT 1.00
SBD 2.36