This guide describes how to give someone access to the LegUp git repository.
First make sure you have the latest version of the gitosis-admin repo (you need commit access on your machine to checkout this repository):
git clone email@example.com:gitosis-admin gitosis-admin cd gitosis-admin/ git pull
Get the user to send you their ~/.ssh/id_rsa.pub file as described in Computer Setup.
Take a look at their id_rsa.pub file:
The file contents will look like:
ssh-rsa AAA...GiB acanis@acanis-desktop
In this case the hostname is “acanis@acanis-desktop”. Now look in the keydir folder to see if they already have a key file there with the file extension .pub:
If there is no existing file (the usual case) copy their key file into the keydir directory:
cp /path/to/id_rsa.pub firstname.lastname@example.org
In some cases the same hostname can have multiple entries (for example email@example.com). In that case append the new key value to the existing file:
cat /path/to/id_rsa.pub >> firstname.lastname@example.org
Note: the above file naming scheme is just to keep the directory organized. There is no actual requirement for the filename to match the hostname.
Now modify the gitosis.conf file and add their hostname to the legup-team group. Notice there is no .pub extension here:
[group legup-team] writeable = .... members = ..... acanis@acanis-desktop
If you wish for the new user to only have read-only access to the legup repository, you should add them to the readonly group instead:
[group readonly] readonly = legup members = ... new_user@new_host
Add everything to git:
git add gitosis.conf email@example.com
Verify the changes as you commit:
git commit -v