2 @heading=About the Mob Account
5 <!-- This file is preprocessed by cgi/html.cgi -->
8 <p>The
<tt>mob
</tt> account (the name a tribute to the paper
9 <a href=
"http://www.dreamsongs.com/MobSoftware.html">Mob Software: The Erotic Life of Code
</a>)
10 is.a way to enable
<em>anonymous push access
</em> for your project.
11 This is largely an experiment and may be scrapped in the future if
12 it will not get widespread use, but we think it's an interesting try.
13 The idea is to provide unmoderated
<em>side
</em> channel for random
14 contributors to work on a project, with similar rationale as
15 e.g. Wikipedia - that given enough interested people, the quality
16 will grow rapidly and occassional
"vandalism" will get fixed quickly.
17 Of course this may not work nearly as well for software, but here
18 we are, to give it a try.
</p>
20 <h2>For Repository Admins
</h2>
22 <p>How it works? First, you need to add the
<tt>mob
</tt> user to the
23 list of users allowed to push in your project.
<tt>mob
</tt> is a
24 keyless, passwordless user that anyone can use to push, without
25 any special setup.
<strong>But
</strong> this does not mean that
26 your project is now in the hands of raging mindless mob! The
<tt>mob
</tt>
27 user has a special restriction: it can push only to an existing
28 <tt>mob
</tt> branch. This means that the second step you need to take
29 is to create a
<tt>mob
</tt> branch in the repository (e.g.
30 <code>git checkout -b mob
31 && git push origin mob
</code>). Then the
<tt>mob
</tt> user
32 will be able to push to this and only this branch, and it won't be
33 able to push whatsoever until you take the second step.
</p>
35 <p>To sum it up: Anonymous pushes are allowed
<em>only
</em> to the
<tt>mob
</tt>
36 branch and
<em>only
</em> if you add a
<tt>mob
</tt> user and do an initial
37 pushout of the
<tt>mob
</tt> branch.
</p>
41 <p>After cloning the repository, do
<code>git checkout mob
</code> to move to the
42 <tt>mob
</tt> branch.
</p>
44 <p><strong>Note that you are taking a huge security risk on yourself
45 if you just blindly grab the mob branch and run it on your
48 <h2>For Developers
</h2>
50 <p>Just commit on the
<tt>mob
</tt> branch you've checked out and
51 <code>git push
</code> when the time is ripe.
52 Have fun and enjoy, you are making the history!
</p>
54 <h2>In Detail Examples
</h2>
57 <h3>Pushing to the mob branch with ssh
</h3>
59 Nothing special is needed except to remember to set the mob user name in the push url:
63 git clone -b mob @@gitpullurl@@/mobexample.git
65 git remote set-url --push origin @@mobpushurl@@/mobexample.git
66 echo 'It worked!'
>> example.txt
68 git commit -m 'example commit'
72 <p>Note that it
’s not strictly necessary to fetch with the git protocol, the ssh protocol can also be used for fetching.
</p>
76 <h3 id=
"httpsmobpush">Pushing to the mob branch with https
</h3>
78 <p>In order to push with https, several things will be needed first:
</p>
81 <li>The @@nickname@@ root certificate
82 <p>This can be fetched from
<a href=
"@@gitwebfiles@@/@@nickname@@_root_cert.pem">here
</a> and will be assumed to be saved to
<tt>/tmp/@@nickname@@_root_cert.pem
</tt> in the push example. See also the
<a href=
"@@htmlurl@@/rootcert.html">Root Certificate Information
</a>.
</p>
84 cd /tmp
&& curl -O @@gitwebfiles@@/@@nickname@@_root_cert.pem
87 <li>The mob user certificate
88 <p>This can be fetched from
<a href=
"@@gitwebfiles@@/@@nickname@@_mob_user.pem">here
</a> and will be assumed to be saved to
<tt>/tmp/@@nickname@@_mob_user.pem
</tt> in the push example.
</p>
90 cd /tmp
&& curl -O @@gitwebfiles@@/@@nickname@@_mob_user.pem
93 <li>The mob user private key
94 <p>This can be fetched from
<a href=
"@@gitwebfiles@@/@@nickname@@_mob_key.pem">here
</a> and will be assumed to be saved to
<tt>/tmp/@@nickname@@_mob_key.pem
</tt> in the push example. Normally, of course, private keys are never shared, but as described above, since everyone is allowed to push to the mob branch the private key for the mob user must be shared with everyone.
</p>
96 cd /tmp
&& curl -O @@gitwebfiles@@/@@nickname@@_mob_key.pem
100 <p>With the prerequisites out of the way, here
’s the mob ssh example redone to use the smart http protocol:
</p>
104 git clone -b mob @@httppullurl@@/mobexample.git
106 git config http.sslCAInfo /tmp/@@nickname@@_root_cert.pem
107 git config http.sslCert /tmp/@@nickname@@_mob_user.pem
108 git config http.sslKey /tmp/@@nickname@@_mob_key.pem
109 git remote set-url --push origin @@httpspushurl@@/mobexample.git
110 echo 'It worked!'
>> example.txt
112 git commit -m 'example commit'
116 <p>Note that it
’s not strictly necessary to fetch with the http protocol, the https protocol can also be used for fetching but when initially cloning the repository it can be a bother to get the two certificates and the key set properly without a project-specific place to configure them yet. See the output of
<tt>git config help
</tt> for more information about configuring certificates and keys.
</p>