【问题标题】:Setting up a cvsrepository with username and passwd使用用户名和密码设置 cvs 存储库
【发布时间】:2013-07-16 15:19:07
【问题描述】:

我一直在尝试设置 cvs 存储库,但无法做到。我会给你我所遵循的步骤的描述

我已经安装了 cvs 和 cvsd。 我在 xinetd.d 中有以下代码

service cvspserver
{
     port = 2401
     socket_type = stream
     protocol = tcp
     user = root
     wait = no
     type = UNLISTED
     server = /usr/bin/cvs
     env = HOME=/home/cvs/cvsroot
     server_args = -f --allow-root /home/ks/cvs/cvsroot pserver
     disable = no
}

我已设置 SystemAuth=no,因此它不会查看系统密码

我添加了具有适当权限的用户和组 我在 CVSROOT 中创建了一个 passwd 文件 并使用 mkpasswd 加密密码

当我检查服务器是否启动时,我得到了以下结果: netstat -tap | grep cvs

tcp        0      0 *:cvspserver            *:*                   LISTEN      1016/cvsd       
tcp        0      0 localhost:cvspserver    localhost:42965         TIME_WAIT   -

这表明服务器已打开并正在运行
当我尝试 export CVSROOT=:pserver:username1@localhost:/home/cvs/cvsroot &&cvs login

我无法登录服务器,它总是给我一个错误 cvs [登录中止]:来自本地主机的无法识别的身份验证响应:cvs [pserver aborted]:/home/cvs/cvsroot:没有这样的存储库

我在整个互联网上进行了搜索,并浏览了许多教程。 请告诉我是否需要检查其他内容。我哪里出错了。

【问题讨论】:

    标签: cvs


    【解决方案1】:

    我也解决了 /etc/cvs/xinetd.d/cvs 但没有成功你必须解决步骤 5 和 6

    以下是设置正确 CVS 存储库的步骤

    1.验证CVS是否安装

      $su - root 
    
    
        $cvs -v
        Concurrent Versions System (CVS) 1.11.22 (client/server)
        Copyright (C) 2006 Free Software Foundation, Inc.
        ...
    

    。如果您的系统上没有安装 CVS,请从您的 Linux 发行版存储库中安装它。例如,在基于 redhat 的系统上,安装 RPM 如下所示。

      $rpm -ivh cvs-1.11.22-5.el5.i386.rpm
    

    2. 创建 CVS 用户和组

      $useradd cvs
      $passwd cvs
       .. give password cvs for example
    

    如果您只希望 开发人员 访问 CVS 存储库,请创建一个开发人员组,如下所示。

        $groupadd **developers**
    

    3. 创建 CVS 存储库目录

         $mkdir /home/cvs/myrepo 
    

    现在作为root用户-->
    a. 如果想将目录限制为仅 developers 组,如果不是 skipp

     $chgroup developers /home/cvs/myrepo   
    


    b. 现在给完全特权组

    $chmod g+srwx /home/cvs/myrep

    4.现在初始化独立目录以制作存储目录

      $su - cvs
      $su /home/cvs/myrepo init
    

    5. 这里你必须解决全局 xinetd.d 服务配置文件 /etc/xinetd.conf 对于 RedHat CentOS

    在 /etc/configure 下面的服务 并附加您的 CVS 代表。目录到

     server_arg = --allow-root=/home/cvs/myrepo -f pserver 
    
    
    service cvspserver
    {
            Port = 2401
                    socket_type = stream
                    protocol = tcp
                    wait = no
                    user = root
                    server = /usr/bin/cvs
                    server_args = --allow-root=/home/cvs/myrepo  --allow-root=/home/cvs/myrepotwo -f pserver
                    env = HOME=/home/cvs/repository
                    log = /var/log/cvslog
    }
    
    #last line of xinetd.conf should be
    includedir /etc/xinetd.d
    

    6. 现在重新加载 xinetd.conf 文件,然后重启 xinetd.d 服务

      # /etc/rc.d/init.d/xinetd reload
      # service xinetd restart
    

    7.设置如下是~/.bash_profile 确保行中没有尾随空格

     export CVSROOT=:pserver:[cvs or user from group]@[hostname or ip address]:/home/cvs/mtoirepo
    

    并执行 bash_profile

     #. ~/.bash_profile  
    

    8.cvs 用户登录

        #cvs login
        Logging in to :pserver:m2i@[host IP]:2401/home/cvs/mtoirepo
        CVS password:
    

    9.为新用户或现有用户设置CVS repo

         #useradd developers myuser
    or
         #usermod -G developers myuser
    

    并按照 setp-7 ,现在 CVS 已从该客户端用户准备好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-27
      • 1970-01-01
      • 2010-12-27
      • 1970-01-01
      • 2014-01-11
      • 1970-01-01
      相关资源
      最近更新 更多