安装gitolite时,我发现:
# aptitude install gitolite
The following NEW packages will be installed:
gitolite
0 packages upgraded, 1 newly installed, 0 to remove and 29 not upgraded.
Need to get 114 kB of archives. After unpacking 348 kB will be used.
Get:1 http://security.debian.org/ squeeze/updates/main gitolite all 1.5.4-2+squeeze1 [114 kB]
Fetched 114 kB in 0s (202 kB/s)
Preconfiguring packages ...
Selecting previously deselected package gitolite.
(Reading database ... 30593 files and directories currently installed.)
Unpacking gitolite (from .../gitolite_1.5.4-2+squeeze1_all.deb) ...
Setting up gitolite (1.5.4-2+squeeze1) ...
No adminkey given - not initializing gitolite in /var/lib/gitolite.
最后一行是我感兴趣的。如果运行,dpkg-reconfigure -plow gitolite
将显示一个对话框,可以修改:
- gitolite的系统用户名,
- 凹凸棒石储存库的位置和
- 提供管理员pubkey。
我更喜欢使用git
系统用户并在安装时提供admin pubkey,例如:
# aptitude install gitolite --user git --admin-pubkey 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDAc7kCAi2WkvqpAL1fK1sIw6xjpatJ+Ms2nrwLJPhdovEY3MPZF7mtH+rv1CHFDn66fLGiWevOFp...'
那当然是行不通的。可以做类似的事情吗?如何提前确定配置参数?例如,当通过木偶或厨师自动安装gitolite时,这将非常有用。