Skip to content

svn错误:Authentication realm 解决办法

今天把主svn服务器域名进行了更换,跟换的过程中遇到了这样的问题:当对一个已经现在的副本重定向(relocation)到新域名时,svn不断的提示输入密码,即使密码正确也无法实现重新定向(relocation),错误提示如下:

Authentication realm: <http://www.domain.com:80> myproject
username:

于是不断按照提示输入用户名和密码,但是正确的用户名和密码也没有办法登录,最终提示权限认证错误而终止。郁闷极了,因为同样的命令在dreamhost主机是没有问题的,为什么到了自己的服务器就不行了呢。我在linux下命令行对已经下载的副本进行svn重定向操作的命令如下:

svn switch http://www.domain1.com/myproject --relocate http://www.domain2.com/myproject
这条命令在dreamhost执行是没有问题的

在另外的linux redhat服务器执行后没有结果,于是翻svn手册查到了需要这样执行:

svn switch --relocate http://www.domain1.com/myproject http://www.domain2.com/myproject

一样是提示重复提示输入用户名和密码的错误:Authentication realm

继续查手册,发现svn switch命令可以直接带–username和–password,于是对上面的命令加入了用户名和密码后,svn重定向成功!完整的代码如下:

svn switch --relocate http://www.domain1.com/myproject http://www.domain2.com/myproject --username usera --password pswordabc

ok!一切搞定,我google一下好像有人也遇到了同样的问题,但是他们的解决办法是修改svn的密码文件,感觉比较复杂,所以写出来供有用的朋友拿!

svn Authentication realm(3)svn authentication(2)Authentication realm: <svn://(1)svn Authentication realm:(1)SVN HTTP Authentication(1)svn 更换域名(1)svn realm(11)Authentication realm SVN(7)realm svn(2)Authentication realm(4)Authentiation realm svn(1)Authentication realm: <http:(1)svn realm windows(1)Authentication realm:(8)svn重定向(1)

Share in Google Reader Share in Google Reader 分享到 FriendFeed 分享到 FriendFeed 推荐到豆瓣 推荐到豆瓣 分享到 Twitter 分享到 Twitter

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*