You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Reposurgeon镜像SVN失败问题:原因排查与解决方法

SVN转Git时Repotool镜像失败的解决办法

更新:已找到问题根源,需配置SVN存储密码,具体解决步骤见下文。


问题描述

  • 需求:将一个非标准结构的SVN仓库转换为Git仓库
  • 环境:WSL/Ubuntu系统,先后使用过apt安装的Reposurgeon 4.31-1版本和仓库中的5.0版本
  • 异常现象:git-svn可正常操作该SVN仓库,但Repotool执行镜像操作直接失败;手动执行svn info --show-item=revision命令能正常返回仓库版本号

Repotool执行错误日志

omannisto@olli-lt:~/repotest2$ repotool initmake AltiumComponentLibrary svn git
repotool: a Makefile already exists here.
repotool: generating a stub options file.
repotool: generating a stub lift file.
repotool: generating a stub map file.
omannisto@olli-lt:~/repotest2$ nano Makefile
omannisto@olli-lt:~/repotest2$ make
rm -rf AltiumComponentLibraries-mirror
make AltiumComponentLibraries.svn AltiumComponentLibraries.opts AltiumComponentLibraries.lift AltiumComponentLibraries.map
make[1]: Entering directory '/home/omannisto/repotest2'
repotool mirror http://omannisto@10.4.0.44:8008/svn/oxford/AltiumComponentLibraries AltiumComponentLibraries-mirror
Authentication realm: <http://10.4.0.44:8008> Authorization Realm
Password for 'omannisto': **********

repotool: executing "/usr/bin/sh -c svn info --show-item=revision  http://omannisto@10.4.0.44:8008/svn/oxford/AltiumComponentLibraries": exit status 1
make[1]: *** [Makefile:71: AltiumComponentLibraries-mirror] Error 1
make[1]: Leaving directory '/home/omannisto/repotest2'
make: *** [Makefile:62: AltiumComponentLibraries-git] Error 2
omannisto@olli-lt:~/repotest2$ nano Makefile

手动执行svn info的输出

omannisto@olli-lt:~/repotest2$ svn info --show-item=revision  http://omannisto@10.4.0.44:8008/svn/oxford/AltiumComponentLibraries
Authentication realm: <http://10.4.0.44:8008> Authorization Realm
Password for 'omannisto': **********

37557
omannisto@olli-lt:~/repotest2$

解决办法

问题核心是Repotool执行SVN命令时无法自动获取密码,即使手动输入过密码也无法复用。需要配置SVN自动存储密码:

  1. 打开SVN全局配置文件:~/.subversion/servers
  2. 在[global]段落中添加或修改以下配置项:
    store-passwords = yes
    store-plaintext-passwords = yes
    
  3. 手动执行一次需要输入密码的SVN命令(比如svn info http://omannisto@10.4.0.44:8008/svn/oxford/AltiumComponentLibraries),输入密码后SVN会自动存储凭证
  4. 重新运行make命令执行Repotool镜像操作,此时Repotool能自动读取存储的密码,命令可正常执行

内容的提问来源于stack exchange,提问作者Barleyman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.21 14:32:06