gitolite 安裝

FreeBSD gitolite 安裝
安裝:

1
# cd /usr/ports/devel/gitolite ; make install clean;

安裝結束最後面會看到以下提示:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
==============================================================================
 
Final gitolite installation instructions:
 
Any ssh user can be a gitolite provider. Simply run the following command as
the user:
 
/usr/local/bin/gl-setup /path/to/admin.ssh.key.pub
 
This will setup up the configuration files for gitolite, designating where the
repositories are located and other options.
 
The admin ssh key allows full access to the gitolite-admin repository where
additional users and repositories can be configured.
 
By default, the git user is created for use by gitolite.
 
==============================================================================
===> Correct pkg-plist sequence to create group(s) and user(s)
===>   Registering installation for gitolite-2.1
===>  Cleaning for gitolite-2.1


1.先自行新增一位使用者,此範例使用git.
2.切換到git使用者.
3.起始化gitolite並輸入 管理者SSH 公鑰admin.key.pub.
4.離開git 使用者回到管理員帳號.
5.使用一般git 操作拉回gitolite管理設定值並開始管理.
6.設定好資料只需push回去即可生效.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# su git
# /usr/local/bin/gl-setup /tmp/admin.key.pub
The default settings in the rc file (/root/.gitolite.rc) are fine for most
people but if you wish to make any changes, you can do so now.
 
hit enter...
/usr/local/libexec/gitolite/gl-setup: vim: not found
creating gitolite-admin...
Initialized empty Git repository in /root/repositories/gitolite-admin.git/
creating testing...
Initialized empty Git repository in /root/repositories/testing.git/
[master (root-commit) 143cabc] start
 2 files changed, 6 insertions(+), 0 deletions(-)
 create mode 100644 conf/gitolite.conf
 create mode 100644 keydir/admin.pub
# exit
# git clone git@srv1.sd.idv.tw:gitolite-admin
# cd gitolite-admin
# vi conf/gitolite.conf
1
2
3
4
5
6
7
8
repo    gitolite-admin
        RW+     =   admin
 
repo    testing
        RW+     =   @all
 
repo    mytest
        RW+     =   @all

新增專案:

1
2
3
4
5
6
7
# cd mytest
# git init
# git remote add origin git@srv1.sd.idv.tw:mytest
# touch readme
# git add .
# git commit -m 'initial'
# git push origin master

One thought on “gitolite 安裝

  1. Pingback: Git 與遠端Server 應用 « SDpower

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *