Project

General

Profile

ContribRepositories » History » Version 1

Denis 'GNUtoo' Carikli, 06/29/2021 02:09 PM

1 1 Denis 'GNUtoo' Carikli
h1. ContribRepositories
2
3
h2. Requirement
4
5
At the time of writing, only GNUtoo and Putti are able to do that, as they are the only people in the admin group in gitolite (this can be changed in conf/gitolite in the gitolite repository).
6
7
h2. Procedure
8
9
First you need to clone the gitolite repository:
10
<pre>
11
git clone ssh://git@git.replicant.us/gitolite-admin
12
</pre>
13
14
Then you need to modify this repository to for adding a new user. In this tutorial we'll add the @newuser@ user.
15
16
Here's an example of modification to do that:
17
<pre>
18
diff --git a/conf/gitolite.conf b/conf/gitolite.conf
19
--- a/conf/gitolite.conf
20
+++ b/conf/gitolite.conf
21
[...] 
22
+repo contrib/newuser/..*
23
+    C       =   newuser
24
+    RW+     =   newuser
25
+    R       =   @admins daemon
26
+
27
[...]
28
diff --git a/keydir/userkey2/newuser.pub b/keydir/userkey2/newuser.pub
29
new file mode 100644
30
index 0000000..f8d32aa
31
--- /dev/null
32
+++ b/keydir/userkey2/newuser.pub
33
@@ -0,0 +1 @@
34
+ssh-rsa [...]
35
</pre>
36
37
Then it would be a good idea to explain a bit why we need to do that (for instance newuser wants to work on Replicant 15, or newuser wants to add support for 6G devices) in the commit message.
38
39
Once the change is pushed, I'm unsure if the newuser directory also needs to be created or not. 
40
41
If it does, the following commands could take care of it:
42
<pre>
43
su -l git
44
mkdir -p /var/lib/gitolite3/repositories/contrib/newuser
45
</pre>
46
47
The new user should then be able to create new repositories just using git push at the right address.
48
49
h2. Caveats
50
51
* Note that pushing to an address with a typo (like @ssh://git@git.replicant.us/contrib/newuser/hardware_replicant_libsamsung-pic@ instead of @ssh://git@git.replicant.us/contrib/newuser/hardware_replicant_libsamsung-ipc@) will create the @hardware_replicant_libsamsung-pic@ repository.
52
* Also I don't know how users can delete repositories, but people with root access to the VM (at the time of writing, GNUtoo and Putti) can still do that.