unable to connect to repository

转自:http://bbs.csdn.net/topics/390675827

错误原因1:svnserve.conf配置有误  

[general]

#匿名访问的权限,可以是read,write,none,默认为read
anon-access=none
#使授权用户有写权限
auth-access=write
#密码数据库的路径
password-db=passwd
#访问控制文件
authz-db=authz
#认证命名空间,subversion会在认证提示里显示,并且作为凭证缓存的关键字
realm=/opt/svn/repositories

 

错误原因二:svn又缓存

连接SVN报如下错误。

Unable to connect to a repository at URL 禁止访问 (forbidden)

 

1.         右键点击本地副本,TortoiseSVN -> Settings -> Saved Data,
2.         顺序点击所有的“Clear”按钮,把本地缓存都清除了,点击“确定”;
3.         再重新checkout。即可。

 

参考资料:

搭建在CentOS下的svn 配置文件不正确导致的不能正常使用的错误
svn的配置文件有的地方需要空格,有的地方不需要空格,配置文件一个不正确,就可能导致svn不能正常使用,通过配置文件这种严格的空格要求看来,svn的设计者应该是写shell程序比较多的。
 此几行配置所在行第一个字母前不能有任何空格,配置项等号左右两边各一个空格。配置项后面也不要紧跟着#之类的注释字符

下面是修改好的一个配置文件片段样板
文件:/home/svn/repos/conf/svnserve.conf 
----------------------svnserve.conf  修改后 begin --------------------------
### Visit http://subversion.apache.org/ for more information.

[general]
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
realm = repos

----------------------svnserve.conf 修改后 end ------------------

svnserve.conf  修改前 
文字“#用户密码文件”和这行文字前面仅邻它的一个空格是多余的
文字“#授权登录文件”和这行文字前面仅邻它的一个空格是多余的
----------------------svnserve.conf  修改前 begin --------------------------
### Visit http://subversion.apache.org/ for more information.


     [general]
     anon-access = read
     auth-access = write
     password-db = passwd  #用户密码文件
     authz-db = authz  #授权登录文件
     realm = repos 

----------------------svnserve.conf 修改前 end ------------------


 配置文件配置不正确时 svn list 命令的错误提示
[root@server-100 ~]# svn list svn://10.168.1.103:9999/repos
svn: E170013: Unable to connect to a repository at URL 'svn://10.168.1.103:9999/repos'
svn: E215004: Authentication failed

配置文件配置正确时svn list 命令执行正常的提示信息:
[root@server-100 ~]# svn list svn://10.168.1.103:9999/repos
Authentication realm: <svn://10.168.1.103:9999> repos
Password for 'svn_admin': *********


-----------------------------------------------------------------------
ATTENTION!  Your password for authentication realm:

   <svn://10.168.1.103:9999> repos

can only be stored to disk unencrypted!  You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible.  See the documentation for details.

You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
'/root/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes
[root@server-100 ~]# 

 

posted on 2015-09-13 21:48  ziyi_ang  阅读(1818)  评论(0编辑  收藏  举报

导航