On this page, you will learn how to register and initialize a new repository using the
repo init command. This command performs the following operations so you don’t have to:
Registers a repository on the network.
Initialize a local repository.
Adds the local node as a remote.
Configures the repository for pushing and pulling.
Registering a new repository requires an identity. On MakeOS, keys offer a way for users to create an identity, authorize transactions, receive/send value and pay for services. You can create a key using the command below:
kit key create
Passphrase> ***Repeat Passphrase> ***✅ Key successfully created!- Address: os150xvxt559v4n5530tw9y5tk2ghfflsczqxcdja
You will be asked to provide a passphrase that will be used to encrypt the key in the keystore.
Like most blockchains, MakeOS require users to pay a small fee to have transactions quickly processed. To continue following this guide, you will need some test coins in your newly created key. Copy your new address and go to our Testnet faucet to request for test coins.
It is time to create your repository. The example below will register a new repository named
express on the MakeOS network.
It will also initialize the repository in the current directory and configure it to make it easy for you to run git sign, fetch and pushing operations.
kit repo init "express" \-u="os150xvxt559v4n5530tw9y5tk2ghfflsczqxcdja" \-f="0.01"
Passphrase> ******✅ Transaction sent!- Hash: 0x9057bb672bdaa0cc2e45...ae7049d80f90517698f39f2d93cConfirmed!Step 2: Initialized repositoryStep 3: Configured repositorySuccess! Created a new repository express
-u flag specifies the address of your new key; This key is known as the signing key. It is used to sign the transaction and will pay any network fee and deduction. You will be asked for the passphrase that will be used to unlock the signing key.
By default, the signing key will be added as the first contributor (or Push Key) to the repository. It will also be used to sign future push requests.
-f flag specifies the amount of fee you are willing to pay from your signing key to the network in other to create the repository. This fee will also be used as the transaction fee for future push requests.
You can change the fee by setting
user.fee in git config, by running:
kit repo config -f=<your fee> or
git config user.fee <your fee>.
See the init command documentation for more options.
By default, the
init command will set
origin remote to
127.0.0.1:9002 where it expects a Kit node to be running. At this point, we are assuming that you already have a running local node.
Every time you add a commit, Git will fire the
post-commit hook which will cause Kit to sign your new commit and create a fresh push token that will be used to authenticate your push request.
Go ahead and create a commit and then push it.
git push origin <branch> # Change <branch> to your own branch name
To create a permission-less, un-censorable and un-stoppable code collaboration platform, it is important that users are able to run their own remote node. However, it can take some minutes for a remote node to sync up with the network causing users to wait for some time to push updates. We provide seed remote nodes for users who cannot wait to sync with the network or do not want to run or manage their own remote node.
You can add the seed remote URL to your repository using
git remote command:
git remote add seed "http://s1.seeders.live:9002/r/<your-repo>"
<your-repo> with the name of your own repository.