Personal Git repository

UiOs Git service supports personal Git repositories. Except from registration of the SSH-key one does not need to involve USIT to create new repos. The users are able to adjust the access control and such for their personal Git repositories.

1   Registring the SSH-key

If you're not already a registred Git user your SSH key has to be added to the Git service. This is a manual job that's done by USIT. Send in your public SSH key to to be registred in the Git service.

2   Create a new repository

All personal Git repos are located at this path:


To create a repository one only needs to clone the repo (in this example for the user amedov):

$ git clone
Initialized empty Git repository in /tmp/myrepo/.git/
Initialized empty Git repository in /var/lib/git/repos/u/amedov/myrepo.git/
warning: You appear to have cloned an empty repository.

Then make the content and do a commit:

$ git add *
$ git commit -m 'initial commit'
[master (root-commit) 90de8c8] initial commit
 2 files changed, 2 insertions(+), 0 deletions(-)
 create mode 100644 bar
 create mode 100644 foo

And then push it upstream:

$ git push origin master
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 262 bytes, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: sed: can't read ./description: No such file or directory
 * [new branch]      master -> master

After this you can use the repo u/amedov/myrepo in ordinary fashion.

3   Commands for the Git service

The Git service supports a few commands that the user can use via SSH against

ssh <command> [arguments]


$ ssh help
hello amedov, this is gitolite3 3.3-1.el6 on git 1.7.1

list of remote commands available:


Each of these commands have their own help. Example:

$ ssh desc -h
Usage:    ssh git@host desc <repo>
          ssh git@host desc <repo> <description string>

Show or set description for user-created ("wild") repo.

3.1   Change the description of your repo

The description of the personal Git repos are only used for the presentation on the webpage for Git: ( You may change the description yourself. This is done with the command desc. Example:

$ ssh desc u/amedov/myrepo 'Amedovs test-repo'

3.2   Access administration

One can add other registred users (see Registring the SSH-key), and the special users "daemon" and "gitweb" to your personal repository with the command perms.

Example: Give access to the users daemon and gitweb, so the repo can be viewable on the web, and for the whole world through the Git protocol:

$ ssh perms u/amedov/myrepo + READERS daemon
$ ssh perms u/amedov/myrepo + READERS gitweb

Example: Give read and write access to another user:

$ ssh perms u/amedov/myrepo + READERS staalej
$ ssh perms u/amedov/myrepo + WRITERS staalej

Example: remove the write access:

$ ssh perms u/amedov/myrepo - WRITERS staalej

Example: List out users with access:

$ ssh perms u/amedov/myrepo -l
READERS daemon
READERS gitweb
READERS staalej
WRITERS staalej

3.3   Close the Git repository

One can temporarily close push to a repository with the command writeable. Example:

$ ssh writable u/amedov/myrepo off 'Get off my repolawn!'

If you then try to push to the repo you'll get the message you specified in the former command:

$ git push
FATAL: Get off my repolawn!
fatal: The remote end hung up unexpectedly

To open the repo again, type this:

$ ssh writable u/amedov/myrepo on

3.4   List of all your repos

You can get a list of all the repos you have access to with the command info. Example:

$ ssh info
hello amedov, this is gitolite@git-prod01 running gitolite3 3.3-1.el6 on git 1.7.1

     C  u/CREATOR/..*
 R W    check_linux_bonding
 R W    check_openmanage
 R W    gitolite-admin
 R W    testing
 R W    u/amedov/myrepo

Please see for more help

3.5   Delete repo

To delete a repo no longer in use, contact and ask them to delete your repo.

3.6   External resources

Av Safet Amedov
Publisert 17. sep. 2015 09:48