I always forget this, and end up either not having SVN on my design folders, causing me much wasted time rewriting code when I accidently dont download changes on my machines, or trawling through my notes to remember how to correctly set up SVN on (MT) Media Temple servers. Hopefully you find this useful.
By default, SSH remoting is disabled on MediaTemple accounts, requiring you to explicitly enable it in the Server Administrator control panel section for your primary domain:
Once there, set SSH on â€œEnabledâ€, and save your changes. MediaTempleâ€™s easy-to-use configuration tool couldnâ€™t make this step any simpler.
Im working on a mac, so this tutorial is written for Apple users; open up terminal and connect to Media Temple as firstname.lastname@example.org. For example, if your site were example.com, you would connect as follows:
The domain “example.com” is in there twice, first because itâ€™s part of your full username, and second to point SSH at the right server. (If your SSH client complains about not being able to connect, you can try replacing the first @ sign with its encoded version, â€œ%25â€³.) Type “yes” to confirm adding example.com to your known_hosts, if asked, then enter your administrator password to finish logging in.
Enter the following commands to switch to your “data” directory (provided by MediaTemple), and create a basic repository for your code/information:
Change directory (cd) to your data directory:
Create a â€œreposâ€ directory to hold one or more repositories:
Change directory to the folder you made in the previous step:
Create a repository (replace “folder” with your desired repository name, using underscores for spaces). Letter case is important, so if you capitalize any part of the name now, you’ll have to capitalize it later when using it. The bit about “fsfs” is to use a specific Subversion database type recommended by MediaTemple â€” itâ€™s the default type for newer versions of Subversion, but itâ€™s best to put it just to be safe.
<code>svnadmin create folder --fs-type fsfs</code>
You can repeat this to create as many repositories as you wish inside the “repos” folder.
Log out of MediaTemple:
On your local computer (not on MediaTemple), decide where you want to keep your repositories. I recommend someplace easy to get to like /workingcopies/, but a repo can go anywhere you prefer. Check out a copy of the repo you just made:
<code>svn checkout svn+ssh://email@example.com@example.com/home/1234/data/repos/folder /workingcopies/folder </code>
Be sure to replace “1234” with your four-digit MediaTemple server ID number that can be found in your Service Activation email.
To verify everything drop a simple file into your new repository folder at /workingcopies/folder, such as test.txt, and do:
<code>svn add test.txt svn commit -m "Adding test file."</code>
Posted On: Tuesday, September 8th, 2009 @ 6:13 pm by Ian Tearle
If you would like to discuss anything about your next project please drop me a line.
Startup Websites: £19.00 per month
Commerse Websites: £39.00 per month
Native Apps: £2000
No matter how small your project is, or if the prices above scare you, please do get in touch, I shall always listen and will advise freely alternative ideas or solutions. If you are a charity, let's talk!