0
votes

I can't understand what am I doing wrong. I want to have a Subversion Repository in my Shared Hosting and I want to be able to checkout all files to my local PC using e.g. TortoiseSVN

So what I'm doing:

1) I created repository using my SSH in the /home/myaccount/public_html/svn/ folder

svnadmin create public_html/svn

2) it creates the repository with all folders:

  • /public_html/svn/conf
  • /public_html/svn/db
  • /public_html/svn/hooks
  • /public_html/svn/locks

3) Then I edited conf/svnserve.conf and conf/passwd

conf/svnserve.conf

anon-access = none  
auth-access = write  
password-db = passwd 

conf/passwd

john = mypassword

Then Start Problems

4) Trying to create /myproject/ folder in /svn/ folder

cd /home/myaccount/public_html/svn/
svn mkdir myproject

It returns "svn: 'public_html/svn' is not a working copy" Why I get this error?

5) Ok, I'm trying to browse my svn directory using TortoiseSVN Browser, I'm inserting this URL: http://xxx.xxx.xxx.xxx/svn/ The xxx... is my Dedicated IP Address of my Shared Hosting

Ok I'm waiting and expecting to see the /svn/ folder but it returns this error:

Redirect Cycle Dedicated for http://xxx.xxx.xxx.xxx/svn/

And that's it, I have two issues now, and I can't understand the reason, please let me know what am I doing wrong.

2

2 Answers

1
votes

Getting svn started is tricky. This is something to try at this point (assumes public_html directory is under ~ or $HOME):

cd $HOME
mkdir init_project1
cd init_project1
echo "Directory under svn revision control." > readme.txt
cd $HOME
svn import init_project1 file://$HOME/public_html/svn/project1 -m "Initial import"
cd $HOME
rm -rf init_project1
svn co file://$HOME/public_html/svn/project1
0
votes

Preface:

You made a lot of mistakes and (probably wrong) assumptions

  1. Are you absolutely sure, that svnserve is on your hosting?
  2. Even if it installed, is it running?
  3. Even if it running, which configuration it used?
  4. If it running and serve all repositories on host, why you tried to checkout http:// type repository?
  5. Why you used this strange and wrong URL, which will be wrong even after changing http:// to svn://
  6. Why hosting-specific questions and problems you tried to solve here, and not with hosting's support staff? We aren't sensitives to answer on questions 1-3

Thinking:

In the assumptions

  • svnserve is running as daemon
  • svnserve port is not redefined
  • svnserve is not rooted

using svnserve, a Custom Server from SVN Book as starting point, namely this para

Once we successfully start svnserve as explained previously, it makes every repository on your system available to the network. A client needs to specify an absolute path in the repository URL. For example, if a repository is located at /var/svn/project1, a client would reach it via svn://host.example.com/var/svn/project1

I'll suggest these actions

  • Create new repository outside web-space (for svn:// reposiritories http-browsing of repo doesn't give anything useful and readable, don't mix svn:// and http:// repo)
  • Identify full path to te repo-dir (pwd)
  • Construct real URL of your repo, it will be smth. like svn://SERVERNAME/home/myaccount/svn/
  • Test repo in TSVN's repo-browser from external world or (better) from CLI svn-client: (in case of error you'll get more detailed description of problem) svn ls svn://SERVERNAME/home/myaccount/svn/