git-svn 获取授权失败

发布于 2024-12-10 13:22:18 字数 1052 浏览 4 评论 0原文

我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

晨曦÷微暖 2024-12-17 13:22:18

首先,--trunk接受子目录,而不是绝对url。接下来,您应该提供 --parent 以仅获取最多的修订版本。试试这个方法

git svn clone --username afoglia --parent svn://some/repo --trunk=trunk/project/ project-git

如果不行试试这个方法

git svn clone --username afoglia --parent svn://some/repo/trunk/project/ project-git

First, --trunk accepts subdir, not absolute url. Next, you should provide --parent to get the most revision only. Try this way

git svn clone --username afoglia --parent svn://some/repo --trunk=trunk/project/ project-git

If it doesn't work try this way

git svn clone --username afoglia --parent svn://some/repo/trunk/project/ project-git
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文