zoukankan      html  css  js  c++  java
  • 添加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.



  • 相关阅读:
    什么是 Linux
    Java常用几种加密算法
    Java多线程
    SpringSecurity相关配置【SpringSecurityConfig】
    应用上下文配置【AppConfig】
    web.xml
    Web上下文配置【MvcConfig】
    SpringMVC4零配置--Web上下文配置【MvcConfig】
    HTML <meta> 标签 遇到<meta http-equiv="refresh" content="0; url=">详解
    java如何获取当前机器ip和容器port
  • 原文地址:https://www.cnblogs.com/zxpo/p/3865761.html
Copyright © 2011-2022 走看看