I use Hostgator as my hosting company. I love them – great service, tons of space and no long term obligations. And the servers are fast. Now, another reason to love them – running Subversion repositories on your server with the caveat – you can only have one account to account to access that repository. If you develop by yourself, and I do for now, it’s not a problem. So how do you do it – assuming you are a Java coder using Eclipse on Windows?
- Send Hostgator support a request to get SSH access to your server. They will ask you to send in a picture id and once that is cleared, you should be good to go. A matter of a day or two.
- Install Subclipse SVN plugin for Eclipse. The Subversive plugin DOES NOT WORK.
- Install the really good Tortoise SVN client
- Set up an environment variable called SVN_SSH. To do that, go to the Windows Control Panel -> System -> Advanced -> Environment Variable -> New (under the bottom Window). For variable name enter the value
SVN_SSH
and for its value enterc:\\Program Files\\TortoiseSVN\\bin\\TortoisePlink.exe
(assuming you installed Tortoise SVN in the default location). - Start Eclipse and go to the Subclipse options: Window -> Preferences -> Team -> SVN . There, for the SVN Interface select “SVNKit (Pure Java)”. Click OK to store the setting.
- Now, using Putty or some other SSH tool, SSH to your account. You will need to set up a repository for your project. To do that, create the directory that will be used as repository, say
/myrepo
. Now, create an Subversion repository inside that directory:svnadmin create myrepo
. - Create a new project by checking out the repository from SVN. To do that, in Eclipse, go to: File -> New -> Other -> SVN -> Checkout Project From SVN.
- The ‘Checkout from SVN’ window will appear. There select to create a new repository location
- For the URL, enter:
svn+ssh://<your hostgator admin user name>@<your domain name>:2222/home/<your hostgator admin user name>/<Repository directory path>
. In other words, if your domain is example.com, your admin user name is joey and the path to your repository is/myrepo
, then your URL will besvn+ssh://joey@example.com:2222/home/joey/myrepo
- Another popup window will follow that will ask you for your SSH user name. Enter the details and make sure they are saved.
You should be good to go at that point as the rest of the process is the normal project checkout scheme used by Subclipse.
Two resources were helpful: The support message board post on the subject and this blog entry.
Hope this helps!