简体   繁体   English

git cvsimport错误:“ root ...必须是绝对路径名”

[英]git cvsimport Error: “root … must be an absolute pathname”

I'm trying to clone a CVS repository using git: 我正在尝试使用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$ 

I see that another man had a similar problem here . 我看到另一个男人在这里也有类似的问题。 He cites his solution: "As long as I use anonymous access then I can get the convert working!". 他引用了他的解决方案:“只要我使用匿名访问,就可以使转换正常工作!”。 This doesn't work as our server will certainly not allow anonymous access (even if they did for reads, I need read/write access). 这是行不通的,因为我们的服务器肯定不允许匿名访问(即使它们允许读取,我也需要读/写访问权限)。

I'm following the instructions from gitcvs-migration which says: 我正在按照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>

I have followed these instructions (and have cvsps version 2.1) by navigating to a local working copy. 我通过导航到本地工作副本来遵循这些说明(并具有cvsps版本2.1)。 It's obvious that git cvsimport is finding my CVS_ROOT from the CVS directory in my working copy because I didn't specify it, but it's showing up in the error message. 显然git cvsimport是在我的工作副本的CVS目录中找到我的CVS_ROOT,因为我没有指定它,但是它显示在错误消息中。

Please let me know if you can help. 如果您可以提供帮助,请告诉我。 Remember, something small could be something big! 记住,小事可能是大事! :-) :-)

I finally had some success with the git cvs command. 我终于在git cvs命令上取得了一些成功。 It seems that you can import your directory without specifying :extssh in your cvs root. 看来您可以导入目录而无需在cvs根目录中指定:extssh。 Simply go to a new directory and enter: 只需转到一个新目录并输入:

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

This solved the "must be an absolute pathname" error. 这解决了“必须是绝对路径名”错误。

I'm very happy to have figured it out: 我很高兴发现了这一点:

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

Perhaps git cvsimport doesn't accept extssh as an authentication mechanism ? 也许git cvsimport不接受extssh作为身份验证机制?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM