• 添加gitolite用户和仓库


    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

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

    注意:xxx.pub文件名xxx即是你登录到gitolite上的用户名。

    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.



  • 相关阅读:
    scala -- 柯里化
    scala-- 高阶函数
    neo4j 数据库导入导出
    scala -- 模式匹配
    命名空间
    [BZOJ1018][SHOI2008]堵塞的交通traffic 线段树维护连通性
    [BZOJ1017][JSOI2008]魔兽地图DotR 树形dp
    [BZOJ1260][CQOI2007]涂色paint 区间dp
    [bzoj1787][Ahoi2008]Meet 紧急集合
    [BZOJ2243][SDOI2011]染色
  • 原文地址:https://www.cnblogs.com/zxpo/p/3865761.html
Copyright © 2020-2023  润新知