TortoiseSVN and Subversion Repositories

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

I posted at the end of this thread, but I think this is really a new topic.

I want to set up Subversion repositories primarily for development of Drupal sites, using the TortoiseSVN client.

I have installed Subversion on my shared hosting server at BlueHost - a whole other adventure and exercise in fixing bad code -

I can connect to the repository directory with the Tortoise repobrowser

I right-click on the directory I want to Import to the repository using the same url and it does not connect

URL: svn://[email protected]/home2/username/repos/project_name/

(with actual username)

and I get: Error: Can't connect to host 'netsperience.org': A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

I set up a SFTP/SSH in Filezilla for the server and I see the Subversion directories and the ~repos and project_name directories... and I can upload the project folder ("babu57") to the project_name directory

So I got 2 questions:

1. How do I upload/import directories and files from my machine to the repository with TortoiseSVN?

2. How do I set up a repository to also be a live website?
Something like: svn://[email protected]/home2/username/public_html/project_name/ ? instead of the repos directory?

I set up a SFTP/SSH in Filezilla for the server and I see the Subversion directories and the ~repos and project_name directories... I uploaded the "babu57" folder inside the project_name directory...

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

I have created a new repository within public_html:

svn://[email protected]/home2/username/public_html/repository/

so can I point a subdomain (or domain) to the "repository" directory? or a subdirectory within "repository" and use TortoiseSVN to manage the files?

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

I created a subdirectory in public_html/repository named "babu57" and used Filezilla SFTP to upload the files to it

Then I created a folder "babu57" in xampplite/htdocs and I tried to checkout the repository directory - but I got the same error about unable to connect

I'm reading the Tortoise manual, but it's got all that stuff about locking and merging files and stuff....

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

I'm surprised you can make and install software on a shared hosting account. Are you sure it's not a VPS?

1. How do I upload/import directories and files from my machine to the repository with TortoiseSVN?

TortoiseSVN has a decent help section to find direct answers. It would be easier than explaining it here. Smiling

2. How do I set up a repository to also be a live website?
Something like: svn://[email protected]/home2/username/public_html/project_name/ ? instead of the repos directory?

No...you don't want the actual repository hosted at your website's location. The actual repository directory contains a bunch of data that will not look like your actual files. This is because it stores all the versions of your repository. Every time you run a commit, it increments the version. You can go back to any version you want by running a special checkout command.

When having a website stored in a repository is required, simply ssh to the location of your web directory and run a checkout. So ssh to example.com, cd to the public_html directory (or wherever), and run the svn command to checkout the files.

On a side note...I'm not sure why you need the full path to the repository on your server. You should just have to go to svn://example.com/repo_name/subdir and not include the full filesystem path.

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

Well, I queried all my hosting cos and BlueHost (which happens to be my main host) told me "some customers have installed Subversion but we don't officially support it"

A Google search yielded these results:
how-to-install-subversion-on-a-shared-host
setting-up-subversion-on-bluehost

First I had to email a scan of my driver's license to BlueHost to enable SSH

Then I installed PuTTY

I finally installed Subversion after fixing a typo in the SSH commands (which has already been corrected, thanks Joe!)

So I have successfully created repositories with SSH in PuTTY and Subversion - but I am unable to Import any directory trees in SSH or with TortoiseSVN

Help please! I have read the docs for Subversion and Tortoise, I think I am setting the keys wrong, and now I am totally confused!

(I have replaced my actual username with "username" for security)

My host cp software created SSH keys when I enabled SSH, and I checked that the .ssh dir has 700 permission - and authorized_keys has 600 permission

I have four files in .ssh and also a "putty" directory which is empty

The files are:

authorized_keys
authorized_keys2
netsperience.org
netsperience.org.pub

authorized_keys and authorized_keys2 and netsperience.org.pub are identical, the public key(s) (now the one I created with ssh-keygen -t dsa is appended to authorized_keys)
netsperience.org is the private key

I read about appending the public key to the end of the private key, but not even sure which files to mess with - should I copy the contents of authorized_keys to the end of netsperience.org (the private key file)? Ok, now I copied the two public keys from authorized_keys to the end of netsperience.org (private key generated by host) - still no good

Should I delete all of these keys and start over?

I have no problem connecting with PuTTY (with my username and password) - and I tested a svn help command and it works

I am using Linux/Apache

I created a repository

svnadmin create /home2/username/public_html/antrepo

I tried to import a directory tree from c:/xampplite/htdocs/babu57 and had problems, kept saying /xampplite/htdocs/babu57 could not be found :

svn import /xampplite/htdocs/babu57 file:///home2/username/public_html/antrepo/babu57 -m "initial import"

so I copied the babu57 dir tree to the root c:/babu57

svn import babu57 file:///home2/username/public_html/antrepo/babu57 -m "initial import"

returns only:

Committed revision 1.

but I don't see any files being imported and

svn list file:///home2/username/public_html/antrepo/babu57

lists nothing

ls /home2/username/public_html/antrepo/

lists the repository files & dirs: README.txt conf db etc.

ALSO

trying to use TortoiseSVN Import

I don't connect and get the error:

Command: Import C:\xampplite\htdocs\babu57 to svn://[email protected]/home2/username/public_html/antrepo
Error: Can't connect to host 'netsperience.org': A connection attempt failed because
Error: the connected party did not properly respond after a period of time, or
Error: established connection failed because connected host has failed to respond.
Finished!:

and

Command: Import C:\babu57 to svn://[email protected]/home2/username/public_html/antrepo
Error: Can't connect to host 'netsperience.org': A connection attempt failed because
Error: the connected party did not properly respond after a period of time, or
Error: established connection failed because connected host has failed to respond.
Finished!:

I tried creating a new key pair with the formula at http://blog.macromates.com/2005/subversion-support-and-ssh-key-pairs/

BTW - this formula was flawed:

This line gave me a problem - file not found:

cat id_dsa.pub >>.ssh/authorized_keys

The previous command

ssh-keygen -t dsa

creates the key id_dsa.pub in the .ssh directory (with the defaults) so

mkdir .ssh # if it's not already there

is unnecessary and the next line should be

cat .ssh/id_dsa.pub >>.ssh/authorized_keys

or there should be a

cd .ssh command

then

cat id_dsa.pub >>authorized_keys

anyway, I looked and the key from id_dsa.pub was added to authorized_keys

I also used puttygen to create a key pair

now I am totally confused

When I try to Import with TortoiseSVN with svn+ssh

Command: Import C:\babu57 to svn+ssh://[email protected]/home2/username/public_html/antrepo

I get a popup "Couldn't load this key. Couldn't open file" 3 times in a row

How do I sync the keys on the server in .ssh with Tortoise/pageant? - or should I be using PuTTY as the SSH client for Tortoise instead of pageant? (pageant is in the TortoiseCVS folder, TortoiseSVN set it as SSH client by default)

I have read through the Subversion and Tortoise docs but these questions are not exactly addressed with respect to my specific problems.

any idea what I am doing wrong?

I understand all the Subversion concepts, checkouts, commits etc I just can't get the handshake...

Thanks

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.