0

我正在尝试使用 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$ 

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

我按照其中的说明进行操作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>

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

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

4

2 回答 2

1

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

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

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

于 2017-04-05T13:17:36.630 回答
0

我很高兴能弄清楚:

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作为身份验证机制?

于 2013-09-19T17:13:22.973 回答