码迷,mamicode.com
首页 > 其他好文 > 详细

添加gitolite用户和仓库

时间:2014-07-24 21:19:53      阅读:237      评论:0      收藏:0      [点我收藏+]

标签:style   os   io   for   re   c   工作   linux   

1、在linux工作机上生成密钥对

ssh-keygen -t rsa 

输入用户名但不输入passphrase,这样连接时就不用每次都输入passphrase了。

2、添加用户和仓库

在管理员的工作机上导出gitolite-admin
git clone git@host:gitolite-admin
在keydir中加入第1步生成的xxx.pub
在conf中的gitolite.conf中加入:

   repo repo_name(仓库名)
        RW+ = xxx(用户名)

3、将第2步的操作push到远程服务器上。

4、在linux工作机上下载刚创建的仓库

     git clone git@ip:repo-name

以后就可以操作自己的仓库了。

If they need to know what repos they have access to, they just have to run "ssh git@host info".

groups

Gitolite allows you to group users or repos for convenience. Here‘s an example that creates two groups of users:

@staff      =   alice bob carol
@interns    =   ashok

repo secret
    RW      =   @staff

repo foss
    RW+     =   @staff
    RW      =   @interns

roup lists accumulate. The following two lines have the same effect as the earlier definition of @staff above:

@staff      =   alice bob
@staff      =   carol

You can also use group names in other group names:

@all-devs   =   @staff @interns

Finally, @all is a special group name that is often convenient to use if you really mean "all repos" or "all users".

commands

Users can run certain commands remotely, using ssh. Running

ssh git@host help

prints a list of available commands.



添加gitolite用户和仓库,布布扣,bubuko.com

添加gitolite用户和仓库

标签:style   os   io   for   re   c   工作   linux   

原文地址:http://www.cnblogs.com/zxpo/p/3865761.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!