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

26,978

Solution 1

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

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

Solution 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

Share:
26,978
dba.in.ua
Author by

dba.in.ua

Oracle DBA team leader Oracle JDEdwards development team leader 5 years experience

Updated on July 09, 2022

Comments

  • dba.in.ua
    dba.in.ua almost 2 years

    I have problem with my own Subversion repository. It worked yesterday. But I received 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, how do I fix this?

  • dba.in.ua
    dba.in.ua almost 13 years
    Thanks. But there are templates only. post-commit.tmpl post-revprop-change.tmpl pre-commit.tmpl pre-revprop-change.tmpl start-commit.tmpl post-lock.tmpl post-unlock.tmpl pre-lock.tmpl pre-unlock.tmpl
  • eckes
    eckes almost 13 years
    @dba.in.ua: did you read the full thread? they are talking about apache configuration issues too...
  • Edwin Evans
    Edwin Evans about 11 years
    Do you mean /etc/init.d/apache2ctl restart?
  • mohbandy
    mohbandy over 10 years
    For me, it was to replace your 'svnroot' with just 'svn' as follows: nhibernate.svn.sourceforge.net/svn/nhibernate
  • mounaim
    mounaim over 7 years
    is the directive ErrorDocument 404 default compatible with Apache 2.2 ?