Norwegian version of this page

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.

Bildet kan inneholde: gest, font, symbol, kryss, begivenhet.

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 unix-drift@usit.uio.no to be registred in the Git service.

2   Create a new repository

All personal Git repos are located at this path:

u/<username>/<repo-name>

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

$ git clone gitolite@git.uio.no:u/amedov/myrepo
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
To gitolite@git.uio.no:u/trondham/mittrepo
 * [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