config
Configure a repository.
The config
command configures a repository for easy interaction with a MakeOS remote server. The command sets sensible defaults that aim to make it easy for new users to start pushing to their remote repositories. It performs the following actions:
Adds a remote named
origin
that points to the local address of a MakeOS remote127.0.0.1:9002
.Configures a signing key at
user.signingKey
to be used for signing git references.If a passphrase for unlocking the signing key is provided, it will attempt to start a cache service and store the passphrase for 24 hours in memory.
Sets
post-commit
andpre-push
git hooks for automatic signing.Sets transaction information (e.g fees, nonce etc).
The command stores config options in the repository's .git/config
file.
Usage
Arguments
repodir
- Path to the repository that needs to be configured.
Options
-k, --push-key
- Set the address or index of a key in the keystore to use for signing push requests.-r, --set-remote
- A comma-separated list of remote URLs to add to the repository. e.gorigin https://remote.com/r/repo, backup https://backup-remote.com/ns/repo
.--no-hook
- Prevents the command from adding gitpre-push
andpost-commit
hooks.--no-sign
- When set to true, hooks that enable automatic signing will not be configured (Default: false).-o, --print-out
- (Optional) Print’s out additional config scripts that cannot be executed from within the call process. The output is meant to be evaluated.-h, --help
- Prints out a help message.
Transaction Options
-f, --fee
- The amount of coins to pay as the transaction fee. It will be deducted from the signer's account.-n, --nonce
- The next nonce of the signer's account (current nonce + 1).-v, --value
- The number of coins to transfer from the signer's account.-u, --signing-key
- The address or index of a key that will be used to sign the transaction.-p, --signing-key-pass
- The passphrase that will be used to unlock the signing key.
Passphrase Management
--pass-agent-port
- The port the passphrase agent will use if it is started.--pass-ttl
- The amount of time to store the passphrase in the agent. Accepts duration in the following example format10s
,2h
,4m
.
Example
Configure the repository in the current working directory. The example below sets the signing key to a key at index
0
on the keystore. It sets the fee to be paid for push transactions and finally, it sets the git remote.
Last updated