windows 无法连接到 URL 'svn://localhost' 上的存储库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13646281/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unable to connect to a repository at URL 'svn://localhost'
提问by HJAB
I installed the Subversion package version 1.7 on windows 7 operating system using admin account
我使用管理员帐户在 windows 7 操作系统上安装了 Subversion 包版本 1.7
I created the depository with the following command: svnadmin create "c:\svn_repository"
我使用以下命令创建了存储库: svnadmin create "c:\svn_repository"
I modified the svnserve.conf
and passwd files : anon-access = read
, auth-access = write
, and password-db = passwd
我修改了svnserve.conf
和passwd文件:anon-access = read
,auth-access = write
,和password-db = passwd
I installed the Subversion as a windows service and I started it using the following commands:
我将 Subversion 安装为 Windows 服务,并使用以下命令启动它:
sc create svnserver binpath= "C:\Program Files (x86)\Subversion\bin\svnserve.exe --service -r c:\svn_repository" DisplayName= "Subversion" depend= tcpip start= auto
I also setted the variable SVN_EDITOR
to : set SVN_EDITOR=c:\windows\system32\notepad.exe
我还将变量设置SVN_EDITOR
为:set SVN_EDITOR=c:\windows\system32\notepad.exe
The problem I faced is when I invoke the following command :
我遇到的问题是当我调用以下命令时:
svn mkdir svn://localhost/myproject
I receive the following error :
我收到以下错误:
svn: E200002: Unable to connect to a repository at URL 'svn://localhost'
svn: E200002: C:\svn_repository\conf\svnserve.conf:19: Option expected
回答by Samuele Mattiuzzo
check the svnserve.conf for whitespace at the beginning of the line for each option you specified (in your case, check line 19 of svnserve.conf, if you have a white space before that line, remove it)
检查 svnserve.conf 在您指定的每个选项的行首是否有空格(在您的情况下,检查 svnserve.conf 的第 19 行,如果该行之前有空格,请将其删除)
回答by Lazy Badger
-r c:\svn_repository"
and svnadmin create c:\svn_repository
are incompatible
-r c:\svn_repository"
并且svnadmin create c:\svn_repository
不相容
-r define common root of repositoriesand can't be repository per se
-r 定义存储库的公共根并且不能是存储库本身