RW+ = id_rsa \\该id_rsa是我们之前安装用到的id_rsa.pub也是我们用来管控的账号,给名字可以重取,比如按照编号之类的
repo testing \\testing为project,系统自动会建立的一个测试的仓库
RW+ = @all \\该@all用过svn的知道,这是一个输出组
=====================修改后==============================
[git@redis_master gitolite-admin]$ vim conf/gitolite.conf
#############=====Groups======##################
@dev_rw = sunshine \\我新增的用户sunshine
repo gitolite-admin
RW+ = id_rsa
repo testing
RW+ = @all
repo dev
RW+ = @dev_rw \\新增的输出组
7.3====================修改前============================
[git@redis_master gitolite-admin]$ ls keydir/
id_rsa.pub \\改名字我们可以自定义,在conf配置的用户就是去掉pub后的名称
=====================修改后==============================
[git@redis_master gitolite-admin]$ ls keydir/
id_rsa.pub sunshine.pub \\该秘钥使用TortoiseGit中的PuTTYgen生成,下面会介绍
7.4 TortoiseGit的安装及秘钥生成
进入https://tortoisegit.org/download/官网下载对应版本
安装,就是下一步下一步。
7.4.1 使用PuTTYgen生成秘钥,点击Genetate
7.4.2 鼠标记得要在Please 下面的框框移来移去,不然你就等很久才能生成完毕,这类似我们生成Linux ssh生成敲打键盘一样
7.4.3
1、在key comment后面输入 sunshine
2、把public框框下面的公钥复制到我们之前在keydir目录下的sunshine.pub里面
[git@redis_master gitolite-admin]$ cat keydir/sunshine.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAgKGrcRSPcJE0o37svz0DqncT0cTyI9oGv8mmI9z00wSMumAq82gFdHC0xpVeFcdZQfNM7bsZlxGskEF7/W7p6P4Dc0RCiArcYaSWd0sj1+16ZQADARjFVzf5OBzQNy6OSbAKub/LS1fnl4W7Ad1Mq7wCAVpXzPWVINB3gbzecFekUJ42quqXju+/MtVIfipmEvsJnsOtCfUg5sHUFL7d0dBNgYhXoFPtpuFKS7ay/1dE9JPu83jUB+WkjW/VRIIMrXpAhHVfZ0W25B4cVS04TeNZuLlxAa4HdsI/CbEckzxYvdFDgTPhTqiVTMOFJwhzzUFCxGNlge4vfh1sZP14Ew== sunshine
3、点击Save private key 保存到我们指定的目录
7.5 在服务端执行如下命令
[git@redis_master gitolite-admin]$ git add conf/gitolite.conf \\将gitolite.conf添加到暂存区
[git@redis_master gitolite-admin]$ git add keydir \\将keydir添加到暂存区
[git@redis_master gitolite-admin]$ git commit -m " New add sunshine.pub key and conf/gitolite.conf " \\提交并说明内容
[master 9d8a7e7] New add sunshine.pub key and conf/gitolite.conf
Committer: git <git@redis_master.(none)>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly: