Quickstart Guide

Before starting, make sure Gandalf is installed and configured.

Creating a user and a repository

Create a user:

$ curl -d '{"name": "username", "keys": {"keyname": "ssh-rsa userpubkey user@host"}}' localhost:8000/user

You should see the following:

User "username" successfully created

Now let’s create a repository:

$ curl -d '{"name": "myproject", "users": ["username"], "ispublic": true}' localhost:8000/repository

You should get the following:

Repository "myproject" successfully created

Pushing into myproject

Now we already have access to myproject, let’s create a git repository locally to test our setup:

$ mkdir myproject
$ cd myproject
$ git init
$ git remote add gandalf git@localhost:myproject.git
$ touch README
$ git add .
$ git commit -m "first commit"
$ git push gandalf master

You ould see the usual git output.

Removing a user and a repository

In order to delete a repository, execute the following:

$ curl -XDELETE localhost:8000/repository/myproject

The output should be:

Repository "myproject" successfully removed

To delete a user:

$ curl -XDELETE localhost:8000/user/username

The output should be:

User "username" successfully removed