home | codereading | contact | github | math | misc | notes | patches | tech | README

Monotone notes

Fast howto

To create this fast How-To, I used the Monotone tutorial found here.

User one creates its database:

$ mtn db init --db=~/user.mtn

Generates keys:

$ mtn genkey user@foo.com

Serving your repository to other users

If you want to server your repository to other users, do that:

First, the user will have to tell you his/her public key:

$ mtn pubkey the.user@bar.com > /tmp/the.user.pubkey
$ scp /tmp/the.user.pubkey host:/tmp/

Then, user will need to allow the user to access the database:

$ cat /tmp/the.user.pubkey | mtn --db=~/user.mtn read

Now create the file with read permissions in ~/.monotone/read-permissions with the following content:

pattern "*"
allow "the.user@bar.com"
allow "other.users@other.hosts.com"

And the ~/.monotone/write-permissions file:


Now, just run the mtn serve command:

$ mtn --db=~/user.mtn serve

Other users will be able to get your repository typing these commands:

$ mtn db init --db=~/user.mtn
$ mtn --db=~/user.mtn sync nserhost \*

The * means that you want to sync all branches. If you need to sync a specific branch, type the name of the branch you want to sync.