git-svn 获取授权失败
我正在尝试使用 git 克隆 svn 存储库,但在获取步骤中出现授权失败。我当前只想获取项目的主干:
$ git svn clone svn://some/repo --trunk=svn://some/repo/trunk/project/ --username afoglia .
Initialized empty Git repository in /home/afoglia/projects/new_repo/trunk.git/project/.git/
Using higher level of URL: svn://some/repo/trunk/project => svn://some/repo
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/trunk/project'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
Authorization failed: Authorization failed at /home/afoglia/.local/stow/git-1.7.7/libexec/git-core/git-svn line 3099
我尝试仅获取最新的修订版本,但失败并显示相同的消息。
git 第一步已成功访问存储库;我可以看到修订计数器随着接近此目录的第一个修订而增加。所以我不知道为什么会失败。请注意,布局是单个 trunk 目录下的多个项目,我只有读取该项目及以下项目的权限。
我不熟悉 Perl,但第 3099 行是一个除非有不同的死亡消息,并且字符串“授权失败”在脚本中不存在。
另外,我必须在自己的帐户下安装 git,并编译并安装 svn,所以这可能是缺少 perl 库的结果。 (但我已经成功克隆了一个不安全的 svn 存储库,所以这不是显而易见的事情。)
I'm trying to clone an svn repository with git, but I get an authorization failure on the fetch step. I'm only trying to get the trunk of the project currently:
$ git svn clone svn://some/repo --trunk=svn://some/repo/trunk/project/ --username afoglia .
Initialized empty Git repository in /home/afoglia/projects/new_repo/trunk.git/project/.git/
Using higher level of URL: svn://some/repo/trunk/project => svn://some/repo
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/trunk/project'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
Authorization failed: Authorization failed at /home/afoglia/.local/stow/git-1.7.7/libexec/git-core/git-svn line 3099
I've tried fetching only the most recent revisions, and that fails with the same message.
git is successfully accessing the repository in the first step; I can see the counter of revisions incrementing as it approaches the first revision with this directory. So I don't know why there is a failure. Note that the layout is multiple projects under a single trunk directory, and I only have permissions to read that project and below.
I'm unfamiliar with Perl, but line 3099 is an unless with a different die message, and the string "Authorization failed" is nowhere in the script.
Also, I had to install git under my own account, and compile and install svn as well, so this might be the result of a missing perl library. (But I have successfully cloned an unsecured svn repository, so it's not something obvious.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,
--trunk
接受子目录,而不是绝对url。接下来,您应该提供--parent
以仅获取最多的修订版本。试试这个方法如果不行试试这个方法
First,
--trunk
accepts subdir, not absolute url. Next, you should provide--parent
to get the most revision only. Try this wayIf it doesn't work try this way