Wednesday, April 10, 2013

How to set SVN repository on Bluehost


Step 1

Make sure that svn is installed on your web host. Just ssh into your account and type

which svn

Step 2

Create your repository.
To create the repository, issue the following command:

svnadmin create ~/myrepository

Step 3

Create your SVN user:
Simply open the svnserve.conf file in the editor of your choice:

vim ~/myrepository/conf/svnserve.conf

and add the following:

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


Now you'll need to create a password file:

vim ~/myrepository/conf/passwd

Add a line in that file for your user in the format =

exampleuser = examplepassword

Step 4

Create ssh keys

Windows: Using PuTTYgen, save public and private key, and copy the public key from the box

Step 5

Add your public key to the authorized file

Create .ssh directory if you don't have it

mkdir .ssh
chmod 700 .ssh
touch authorized_keys
chmod 600 authorized_keys
vim authorized_keys

Enter "i" to edit and insert:

command="svnserve -t --tunnel-user=svnuser",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty KEY_FROM_PUTTYGEN

All in one line

Step 6

For Windows use Pageant and add the Private Key you created with PuTTYgen and try to checkout your repository

svn+ssh://[sshuser]@[primary_domain]/[home_path]/[repo_path]

For checkout inside the Bluehost server:

svn co file:///home/svn/project




8 comments:

  1. This worked beautifully on my host Just Host! Thanks so much. I found that any password in the passwd file will do, as the private key is doing all the authentication anyway.

    ReplyDelete
  2. I am really very pleased to visit your blog. Now I find what I want. I check your blog every day and try to learn something from your blog. Thank you and waiting for the latest posts from you.
    Bluehost reviews

    ReplyDelete
  3. Exclusive Discount: BlueHost At $3.45/Mo
    Free ‘.com’ domain
    24/7 technical support
    WordPress integration
    Unlimited traffic
    30-day money-back guarantee
    BlueHost WEb Hosting

    ReplyDelete
  4. Hey, thanks for tutorial but where am I supposed to commands in step 6 to checkout the repository in my local machine ? The same putty login session?

    ReplyDelete
    Replies
    1. This is an old post and I don't remember, but I think the first command is for Windows and the second on the Bluehost server

      Delete
  5. This blog is nice and very informative. I like this http://tophostingtm.com/review-1-bluehost.html blog. Please keep it up.

    ReplyDelete
  6. This blog is nice and very informative. I like this http://tophostingtm.com/review-1-bluehost.html blog. https://free-lancer.in Please keep it up.

    ReplyDelete