Maintaining an open-source ecosystem is more critical than ever in a world where practically all software is based on open-source code.
The dissemination of vital open-source infrastructure is unsustainable if it’s dependent on centrally hosted platforms and corporations. Using such centralized services is incompatible with the values of the free and open-source ecosystem and threatens its survival.
However, a decentralized Git hosting protocol was created as an alternative to eliminate intermediaries and create a stable, effective, and secure peer-to-peer ecosystem.
This post will discuss how to build and push projects to a web3/decentralized Git hosting protocol: Radicle.
Make sure to have Node/NPM installed on your computer. To install, click here for a guide.
What Is a Git Hosting Protocol?
It’s the quickest available for file transfers. It employs the same data-transfer technique as SSH, but without encryption and authentication costs.
We’ll likely want to set up a Git Daemon to serve our project if we’re providing a lot of traffic for a public project or hosting a big project that doesn’t require user authentication for reading access.
What Is Radicle?
Radicle is an open, protocol-based, decentralized coding collaboration network. It allows developers to collaborate on code without relying on third parties.
Radicle was created to mimic the capabilities of centralized code collaboration platforms while maintaining Git’s peer-to-peer nature, extending the benefits of distributed version control to eliminate intermediaries, and creating a stable, effective, and secure peer-to-peer ecosystem.
Project Setup and Installation
We’ll install the Radicle CLI to handle identity and interact with Git to push code to the network.
Installation using Cargo on Linux and x86_64 macOS
Install the Radicle CLI by running the following command:
cargo install --force --locked --path .
Or, directly from our seed node:
cargo install --force --locked --git https:
Installation Using Homebrew
Install the Radicle CLI by running the following command:
brew tap radicle/cli https:
brew install radicle/cli/core
After installation, use the following command to verify the installation:
We should have something similar to what we have below:
Create Radicle Identity
To interact with the Radicle network, we need an identity, which we can generate with
After choosing a display name and setting a passphrase, the Radicle CLI generates two unique identifiers:
Peer IDidentifies our device and the code you publish on the Radicle network and is secured with an
Personal URN, which identifies the user across devices.
Next, we will run the following command:
We should have something similar to what is shown below:
According to the documentation, there’s currently no way to retrieve a lost or forgotten passphrase, so please store it safely!
Building a React Application
It’s time to get our website up and running!
To create a new project, go to a directory of your choice and use the
npx create-react-app command.
This command creates a React.js project.
To install the dependencies, copy and paste the commands below:
npx create-react-app <project name>
cd <project name>
You’ll then receive a message with instructions to connect to your project and execute it locally using the following command:
React.js will now start a hot-reloading development environment that’s accessible by default at
This is a simple application; we can push any project to the decentralized Git hosting protocol.
Deploying to a Git Hosting Protocol Using Radicle
We can create a Radicle project from any existing Git repository and publish it on the Radicle network using two CLI commands —
rad init and
Projects include all Git repository files, revision history, and Radicle-specific metadata, including names, descriptions, and delegates’ information.
Initialize a Project
Navigate to your project directory locally, and run the following command:
rad init created a project URN for our project and associated our Peer ID with it to share it on the Radicle network.
Pushing Our Project to the Radicle Network
Radicle provides three default seed nodes, all of which have the same functionality as listed below:
Run the following command to push your project:
Once you run it in a new project, the CLI will ask which seed node to sync it with.
Next, we’ll see the URL our project is located at on the CLI.
When we click on the URL shown on the CLI, in this case,
https://app.radicle.network/seeds/willow.radicle.garden/rad:git:hnrkym4uq4bbwe41qr1en6hhex17a1srtee6y, we would see something like this:
Cloning a Project
We need to clone the project locally to start collaborating on a project.
When using the Radicle web interface, click on the “Clone” button to display a dropdown with the complete
rad clone command, which you can copy and paste into your terminal.
We can also use the
git command to clone our project using the following command:
git clone <URL>
Next, copy the URL from the Radicle interface below:
Committing/Updating an Existing Project
README file in your project with the following code:
# Getting Started with Create React App pushed to Radicle
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
Commit your changes and push the updates to your existing repository on a decentralized Git hosting protocol with the following commands:
git add .
git commit -m "Update readme"
Accessing Current Profile Information
Access your profile information on the CLI by running the following command:
We’ll have something similar to what we have below, which shows information about the currently logged-in user profile:
Here’s the official documentation to learn more about Radicle’s decentralized Git hosting protocol.
In this article, we learned:
- How to create a Radicle identity,
- How to publish a project to the Radicle network,
- How to clone a project from the Radicle network,
- Committing/Updating an existing project, and
- Accessing current Radicle profile information.
This article is a part of the Hashnode Web3 blog, where a team of curated writers are bringing out new resources to help you discover the universe of web3. Check us out for more on NFTs, DAOs, blockchains, and the decentralized future.