Register a Repository
This page describes how to register an existing local repository to the network.
Last updated
Was this helpful?
This page describes how to register an existing local repository to the network.
Last updated
Was this helpful?
Before you can start pushing your local repository to the MakeOS network, you must first register it just like you do when you create a repository on centralized source code hosting platforms.
You can create a repository via the CLI or within a JavaScript console session.
First, you must create an account key that will be used to sign the transactions. You can skip this set if you already have a key.
Next, let us create a transaction to register a repository named express
to be created.
We use --signing-key
flag to set the address of the key, we created earlier. This is the key that will pay the transaction and registration fees. We also set the transaction fee using the --fee
flag.
Like the CLI example, let us create a repository name express
. In the console, call repo.create
method to register a new repository:
repo.create
is passed an object that contains the properties of the transaction such as:
The name of the repository.
The amount of fees we are willing to pay.
The amount of Latinum coins we want to add to the repository's balance account. If set to a non-zero value, the amount is deducted from the signing account and credited to the repository.
The repo.create
is also passed the private key that will be used to sign the transaction and pay any fee or deductions. For this example, we use the developer account key that includes test coins. The developer key is only available in the testnet or a private development network.
If you want to use a key on the keystore instead of the dev.accountKey
, replace it with user.getKey(accounts[0],"passphrase")
.
where:
accounts[0]
: is the key at index 0 in the Keystore. Alternatively, you can use the address of the key.
passphrase
: is the passphrase used to unlock the key. If not provided, a prompt will be initiated to request for it.