Information Technology Reference
In-Depth Information
Commit the changes in the
gitolite-admin
repository and push it to the server:
# Guest OS (Ubuntu 12.04)
# as vagrant user
$ cd /home/vagrant/gitolite-admin
$ git add -A
$ git commit -m "Peter's priviledges for abc repo"
$ git push origin master
Working within the gitolite controlled repository
Now you are faking the work by Peter. Log in to Peter's account:
# Guest OS (Ubuntu 12.04)
# as vagrant user
$ sudo su - peter
Clone the
abc
repository:
# Guest OS (Ubuntu 12.04)
# as peter user
$ git clone
git@localhost:abc
The clone will succeed only because peter has
R
rights for some references. If you
try to clone
gitolite-admin
repository using peter's account:
# Guest OS (Ubuntu 12.04)
# as peter user
$ git clone
git@localhost:gitolite-admin
the operation will be rejected because Peter has no privileges for the
gitolite-ad-
min
repository.
Now enter the
abc
repository with the
cd
command and switch to branch
a
, re-
move the last commit, and perform a forced push:
# Guest OS (Ubuntu 12.04)
# as peter user
$ cd abc