Difference between revisions of "Git"

From ITSwiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Disk space)
(Disk space)
Line 12: Line 12:
 
== Disk space ==
 
== Disk space ==
  
By default the git admin get 1GB of disk space and a hard limit of 1,5GB, where all the repositories combined can not exceed these limits.
+
By default the git admin get 1GB of disk space and a hard limit of 1,5GB, where all the git admin's repositories combined can not exceed these limits.
  
 
This means that if you have created e.g. 3 repos and have added some users to these, then if just one of these users adds a big file by mistake, and exceed the 1GB limit, then no one will be allowed to push to any of the repos.
 
This means that if you have created e.g. 3 repos and have added some users to these, then if just one of these users adds a big file by mistake, and exceed the 1GB limit, then no one will be allowed to push to any of the repos.

Revision as of 14:23, 18 October 2012

How to get an account?

IMM employees and P.hD's can get a git account by sending an email to IT Service with your SSH public key which you find in ~/.ssh/*pub. E.g. ~/.ssh/id_rsa.pub.

If you don't have a publick then you can create one by

ssh-keygen -N '' -t rsa -f ~/.ssh/id_rsa

It is important that you keep your private key (~/.ssh/id_rsa) and public key safe and have a backup. Should someone get hold of your private key, then all your git repositories can get accessed by that person.

Disk space

By default the git admin get 1GB of disk space and a hard limit of 1,5GB, where all the git admin's repositories combined can not exceed these limits.

This means that if you have created e.g. 3 repos and have added some users to these, then if just one of these users adds a big file by mistake, and exceed the 1GB limit, then no one will be allowed to push to any of the repos.

If the disk usage is e.g. 900MB, and a user pushes a commit of 700MB, then the file system will stop writing when 1,5GB, and there is a potential data loss for the repos owned by the git admin.

Linus is not shy to say that Git is not designed to contain big binary blobs. [Example].

So 1GB is an enormous amount of space, if your uses use it as intended, so these limits should never be a problem. The limits are there however to protect the other git admin's repos, so a user from gitAdmin1 can not impact other admins' repos.

Deleting a big commit

More about this later.

Creating repositories and setting permissions

Once your account have been created, you can clone the gitolite-admin repo by

git clone dtuInitials@git.imm.dtu.dk:gitolite-admin

where dtuInitials should be replaced by your IMM initials which are 4 or more letters long.

This repository is where you create repositories, add users, and set permissions for the users.

Create repository

Add user to repository