git svn fetch-会话URL与预期的会话URL不匹配

问题描述 投票:1回答:1

我尝试在托管svn服务器的ubuntu机器上执行git svn fetch。 (将svn存储库传输到git)git svn响应并显示错误:

Session URL does not match expected session URL: Repository moved permanently to 'http://localhost/svn/repo' at /usr/share/perl5/Git/SVN.pm line 148.

我能够通过浏览器访问svn存储库:

enter image description here

svn co http://localhost/svn/repo/trunk也可以。

我的git仓库的配置如下:

[svn-remote "svn"]
    url = http://localhost/svn/repo
    fetch = trunk:refs/remotes/origin/trunk
    branches = branches/branchA/*:refs/remotes/branchA/*

去年,我执行了完全相同的过程,没有任何问题。错误消息应该告诉我什么?

GIT_TRACE = 1:

07:30:19.957480 git.c:576               trace: exec: git-svn fetch
07:30:19.957508 run-command.c:646       trace: run_command: git-svn fetch
06:30:20.264901 git.c:344               trace: built-in: git rev-parse --git-dir
06:30:20.270689 git.c:344               trace: built-in: git rev-parse --show-cdup
06:30:20.280345 git.c:344               trace: built-in: git config --bool --get svn.useSvmProps
06:30:20.282850 git.c:344               trace: built-in: git config --get svn.ignorerefs
06:30:20.284977 git.c:344               trace: built-in: git config --bool --get svn.uselogauthor
06:30:20.289744 git.c:344               trace: built-in: git config --int --get svn.logwindowsize
06:30:20.296912 git.c:344               trace: built-in: git config --get svn.repackflags
06:30:20.302913 git.c:344               trace: built-in: git config --bool --get svn.parent
06:30:20.308843 git.c:344               trace: built-in: git config --bool --get svn.noMetadata
06:30:20.313303 git.c:344               trace: built-in: git config --get svn.authorsprog
06:30:20.315443 git.c:344               trace: built-in: git config --bool --get svn.fetchall
06:30:20.325453 git.c:344               trace: built-in: git config --get svn.configdir
06:30:20.327644 git.c:344               trace: built-in: git config --int --get svn.repack
06:30:20.336702 git.c:344               trace: built-in: git config --get svn.includepaths
06:30:20.339225 git.c:344               trace: built-in: git config --get svn.username
06:30:20.341358 git.c:344               trace: built-in: git config --bool --get svn.localtime
06:30:20.350228 git.c:344               trace: built-in: git config --bool --get svn.useSvnsyncProps
06:30:20.352446 git.c:344               trace: built-in: git config --bool --get svn.nocheckout
06:30:20.361053 git.c:344               trace: built-in: git config --get svn.authorsfile
06:30:20.365090 git.c:344               trace: built-in: git config --get svn.ignorepaths
06:30:20.367110 git.c:344               trace: built-in: git config --bool --get svn.followparent
06:30:20.376769 git.c:344               trace: built-in: git config --get svn.revision
06:30:20.378979 git.c:344               trace: built-in: git config --bool --get svn.addauthorfrom
06:30:20.384743 git.c:344               trace: built-in: git config --bool --get svn.noauthcache
06:30:20.389012 git.c:344               trace: built-in: git config --bool --get svn.quiet
06:30:20.391455 git.c:344               trace: built-in: git rev-parse --symbolic --all
06:30:20.444247 git.c:344               trace: built-in: git rev-parse --git-path svn
06:30:20.453089 git.c:344               trace: built-in: git config -l
06:30:20.465201 git.c:344               trace: built-in: git config -l
06:30:20.468112 git.c:344               trace: built-in: git config --bool svn.useSvmProps
06:30:20.474744 git.c:344               trace: built-in: git config -l
Session URL does not match expected session URL: Repository moved permanently to 'http://localhost/svn/repo' at /usr/share/perl5/Git/SVN.pm line 148.
git-svn
1个回答
0
投票

找到我的虚拟机的旧版本。正确的git config应该看起来像:

[svn-remote "svn"]
    url = file:///localhost/svn/repo  # <-  instead of http://
    fetch = trunk:refs/remotes/origin/trunk
    branches = branches/branchA/*:refs/remotes/branchA/*

希望这可以防止某天的人浪费时间...

© www.soinside.com 2019 - 2024. All rights reserved.