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