svn: Repository moved temporarily to 'main'; please relocate

こ雲淡風輕ζ 提交于 2019-12-09 06:09:32

问题


I've problem with own svn repository. It worked yesterday. But I've got an error when I was adding new file today:

svn: Repository moved temporarily to 'main'; please relocate

List of my actions:

  1. /home/user/test# svn checkout https://website.biz/repo/siteweb.com

    OK

  2. /home/user/test/siteweb.com/trunk# touch 1.txt

    OK

  3. /home/user/test/siteweb.com/trunk# svn add 1.txt

  4. /home/user/test/siteweb.com/trunk# svn -m "adding 1.txt " commit

    Adding trunk/1.txt

svn: Commit failed (details follow):

svn: Repository moved temporarily to 'main'; please relocate

svn: Repository moved temporarily to 'main'; please relocate

What is this ?! People, please help!


回答1:


svn: Repository moved temporarily to 'something'; please relocate

Dears, it is a lame misconfiguration issue! You probably use dav_svn module to access your SVN repository. And there is global redirection on the ErrorDocument directive in your web server config. You should override this setting for the SVN repository section in the dav_svn config.

Edit the following file: /etc/apache2/mods-enabled/dav_svn.conf Add the directive "ErrorDocument 404 default" between Location lines. It does the trick. My config can be an example for you:

<Location /svn>
  DAV svn
  SVNPath /var/svn-repos/svn
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd
  Require valid-user
  SSLRequireSSL
  ErrorDocument 404 default
</Location>

And reload the web server config with the following command:

/etc/init.d/apache2 reload



回答2:


If you are getting this exception while fetching it from a client, either a command line client or tigris, it may be the url pattern. For example,

http://nhibernate.svn.sourceforge.net/viewvc/nhibernate will work if you replace viewvc with svnroot such as

https://nhibernate.svn.sourceforge.net/svnroot/nhibernate




回答3:


According to this thread, there seems to be a pre-commit hook that sends this message (btw this is the first hit when I ask google for svn Repository moved temporarily to 'main').

Unless you added this hook (assuming you're the only administrator of https://website.biz/repo/siteweb.com), you might be in serious trouble...

On the other hand, it could also be an apache configuration issue. In that case, I assume that my linked thread will help you too.




回答4:


This error might also be caused by a misconfigured client.

It happened to me because I had spaces, not commas, in http_proxy_exceptions in ~/.subversion/servers.

http_proxy_exceptions = *.foo.com *.bar.com

was incorrect, but

http_proxy_exceptions = *.foo.com, *.bar.com

worked. (The first form may have worked in the past.)




回答5:


I received this error when a proxy server was added



来源:https://stackoverflow.com/questions/6251587/svn-repository-moved-temporarily-to-main-please-relocate

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!