9aae0cb
Setting up
9aae0cb
----------
9aae0cb
41bc55c
Setting up gitolite after rpm-install can be done as follows.
9aae0cb
9aae0cb
On the server:
9aae0cb
41bc55c
0)  copy your admin user's ssh public key to /tmp/foo.pub
41bc55c
     (change foo to your username)
41bc55c
41bc55c
1)  run "su - gitolite3" to get a login shell on the gitolite user
41bc55c
41bc55c
2)  run "cp /tmp/foo.pub ." (change foo to your username)
41bc55c
41bc55c
3)  run "gitolite setup -pk ~/foo.pub" 
41bc55c
41bc55c
4)  all done, exit the gitolite3 user shelll (CTRL+D).
9aae0cb
9aae0cb
On whatever machine your key came from (maybe your
9aae0cb
workstation or another account on the same server):
9aae0cb
41bc55c
5)  run "git clone gitolite3@<name.or.ip>:gitolite-admin" to
9aae0cb
    start adding users and repos.
9aae0cb
9aae0cb
To upgrade from a pre 3.0 release, read:
9aae0cb
9aae0cb
https://github.com/sitaramc/gitolite/blob/master/doc/g2incompat.mkd
9aae0cb
https://github.com/sitaramc/gitolite/blob/master/doc/g2migr.mkd
9aae0cb
https://github.com/sitaramc/gitolite/blob/master/doc/g2migr-example.mkd
9aae0cb
https://github.com/sitaramc/gitolite/blob/master/doc/install.mkd
9aae0cb
9aae0cb
Your setup might be more complex than mine was and thus require more care
9aae0cb
and customization, backup everything before you start!
9aae0cb
9aae0cb
The process I followed on my installation was as follows:
9aae0cb
9aae0cb
1. su - gitolite
9aae0cb
2. git clone repositories/gitolite-admin.git
9aae0cb
3. su to root
9aae0cb
4. yum remove gitolite  : this will preserve your old .ssh/authorized keys.
9aae0cb
5. su - gitolite
9aae0cb
6. mv .gitolite.rc .gitolite.rc-old
9aae0cb
7. rm -rf repositories/gitolite-admin.git
9aae0cb
8. Checked documentation to make sure I didn't need to preset the new .rc. 
9aae0cb
I didn't, I have a very simple configuration.
9aae0cb
9. su to root
9aae0cb
10. yum install gitolite3
41bc55c
11. su - gitolite3
9aae0cb
12. gitolite setup -a admin
9aae0cb
13. cd to your gitolite admin
9aae0cb
14. gitolite push -f
9aae0cb
9aae0cb
At this point, everything worked as expected.
9aae0cb
9aae0cb
Quick Notes for admin operations
9aae0cb
--------------------------------
9aae0cb
9aae0cb
To administer gitolite, make changes to the config file
9aae0cb
(conf/gitolite.conf) and/or the pubkeys (in subdirectory
9aae0cb
'keydir') in any gitolite-admin clone, then git add, git commit, and git
9aae0cb
push.
9aae0cb
9aae0cb
ADDING REPOS: Do NOT add repos manually on the server.  Edit
9aae0cb
the config file to give *some* user access to the repo.
9aae0cb
When you push, an empty repo will be created on the server.
9aae0cb
9aae0cb
ADDING USERS: copy their pubkey as keydir/<username>.pub,
9aae0cb
add it, commit and push.
41bc55c