Difference between revisions of "Git"

From ITSwiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Created page with "= How to get an account? = IMM employees and P.hD's can get a git account by sending an email to ITservice@imm.dtu.dk with your SSH public key which you find in <code>~/.ssh...")
 
(How to get an account?)
Line 1: Line 1:
 
= How to get an account? =
 
= How to get an account? =
  
IMM employees and P.hD's can get a git account by sending an email to ITservice@imm.dtu.dk with  your SSH public key which you find in <code>~/.ssh/*pub</code>. E.g. <code>~/.ssh/id_rsa.pub</code>.
+
IMM employees and P.hD's can get a git account by sending an email to [mailto:ITservice@imm.dtu.dk IT Service] with  your SSH public key which you find in <code>~/.ssh/*pub</code>. E.g. <code>~/.ssh/id_rsa.pub</code>.
  
 
If you don't have a publick then you can create one by
 
If you don't have a publick then you can create one by
Line 9: Line 9:
  
 
It is important that you keep your private key (<code>~/.ssh/id_rsa</code>) 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.
 
It is important that you keep your private key (<code>~/.ssh/id_rsa</code>) 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 ==
 +
 +
 +
 +
= Creating repositories and setting permissions =
 +
 +
Once your account have been created, you can clone the gitolite-admin repo by
 +
<pre>
 +
git clone IMMinitialsHere@git.imm.dtu.dk:gitolite-admin
 +
</pre>
 +
where IMMinitialsHere 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 ==

Revision as of 13:32, 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

Creating repositories and setting permissions

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

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

where IMMinitialsHere 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