【问题标题】:git cvsimport Error: "root ... must be an absolute pathname"git cvsimport 错误:“root ...必须是绝对路径名”
【发布时间】:2013-09-24 21:38:02
【问题描述】:

我正在尝试使用 git 克隆 CVS 存储库:

lawsa~/java/projects/iu$ git cvsimport -C ../iugit ebs/fs/kfs
Expected Valid-requests from server, but got: E Root
:extssh:lawsa@cvs.uits.iu.edu:/srcctrl/CVS must be an absolute pathname
lawsa~/java/projects/iu$ 

我看到另一个人有类似的问题here。他引用了他的解决方案:“只要我使用匿名访问,我就可以让转换工作!”。这不起作用,因为我们的服务器肯定不允许匿名访问(即使他们这样做是为了读取,我也需要读/写访问权限)。

我按照gitcvs-migration 的说明进行操作,上面写着:

...cd to a checked out CVS working directory of the project you are interested in
and run git-cvsimport(1):

     $ git cvsimport -C <destination> <module>

我已按照这些说明(并拥有cvsps 2.1 版)导航到本地工作副本。很明显,git cvsimport 正在我的工作副本的 CVS 目录中找到我的 CVS_ROOT,因为我没有指定它,但它显示在错误消息中。

如果您能提供帮助,请告诉我。请记住,小事可能是大事! :-)

【问题讨论】:

    标签: git version-control cvs git-cvs


    【解决方案1】:

    我很高兴能弄清楚:

    lawsa~/java/projects$ git cvsimport -d "$CVSROOT" -C iugit -r cvs -k ebs/fs/kfs
    Expected Valid-requests from server, but got: E Root     
    :extssh:lawsa@cvs.uits.iu.edu:/srcctrl/CVS must be an absolute pathname
    lawsa~/java/projects$ echo $CVSROOT
    :extssh:lawsa@cvs.uits.iu.edu:/srcctrl/CVS
    lawsa~/java/projects$ CVSROOT=:ssh:lawsa@cvs.uits.iu.edu:/srcctrl/CVS
    lawsa~/java/projects$ git cvsimport -d "$CVSROOT" -C iugit -r cvs -k ebs/fs/kfs
    Expected Valid-requests from server, but got: E Root 
    :ssh:lawsa@cvs.uits.iu.edu:/srcctrl/CVS must be an absolute pathname
    lawsa~/java/projects$ CVSROOT=:ext:lawsa@cvs.uits.iu.edu:/srcctrl/CVS                                     
    lawsa~/java/projects$ git cvsimport -d "$CVSROOT" -C iugit -v -r cvs -k ebs/fs/kfs                                                                                                                                   
    Password: 
    Could not chdir to home directory /home/lawsa: No such file or directory
    fatal: Needed a single revision
    Branch 'master' does not exist.
    Either use the correct '-o branch' option,
    or import to a new repository.
    lawsa~/java/projects$ rm iugit -r
    lawsa~/java/projects$ git cvsimport -d "$CVSROOT" -C iugit -v -r cvs -k ebs/fs/kfs
    Password: 
    Could not chdir to home directory /home/lawsa: No such file or directory
    Initialized empty Git repository in /home/lawsa/java/projects/iugit/.git/
    Running cvsps...
    Password: 
    Could not chdir to home directory /home/lawsa: No such file or directory
    cvs_direct initialized to CVSROOT /srcctrl/CVS
    cvs rlog: Logging ebs/fs/kfs
    cvs rlog: Logging ebs/fs/kfs/.settings
    cvs rlog: Logging ebs/fs/kfs/batch
    cvs rlog: Logging ebs/fs/kfs/batch/.securedir
    

    也许git cvsimport 不接受extssh 作为身份验证机制?

    【讨论】:

    • 我运行了几个小时的操作,然后它完成了。然而,我注意到,没有一个分支是这样过来的。
    【解决方案2】:

    我终于用 git cvs 命令取得了一些成功。看来您可以导入目录而无需在 cvs 根目录中指定 :extssh。只需转到一个新目录并输入:

    git cvsimport -v -d user@server:/path/to/dir -r cvs -k my_module
    

    这解决了“必须是绝对路径名”错误。

    【讨论】:

    • 我为你感到高兴:你解决了你的问题,这个问答帮助了你。
    • 我为你感到难过:在 2017 年使用 CVS。
    • 我无法测试您的答案,因为我无权(也不想访问)任何 CVS 存储库。
    猜你喜欢
    • 2022-12-15
    • 2016-03-16
    • 2016-09-29
    • 2016-10-18
    • 1970-01-01
    • 1970-01-01
    • 2018-02-04
    • 2014-02-28
    • 2015-01-14
    相关资源
    最近更新 更多