User Tools

Site Tools


Getting Git Access

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 gitosis-admin
cd gitosis-admin/
git pull

Get the user to send you their ~/.ssh/ file as described in Computer Setup.

Take a look at their file:

cat /path/to/

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:

ls keydir/

If there is no existing file (the usual case) copy their key file into the keydir directory:

cp /path/to/ keydir/

In some cases the same hostname can have multiple entries (for example In that case append the new key value to the existing file:

cat /path/to/ >> keydir/

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 keydir/ 

Verify the changes as you commit:

git commit -v

Finally push:

git push
git_access.txt · Last modified: 2015/05/11 09:38 by acanis