Using Dreamweaver CS5.5+ with svn+ssh on a Mac

Tuesday, June 24th, 2014

This is a really technical article. If you are not comfortable with using a command line interface, please seek help from someone who is comfortable with it before you begin.

I just got a new computer, switching from Windows 7 to Mac OS 10.9. I’m not new to Mac, but it’s been a few years since I used one regularly. It’s been fun getting it set up and remembering all things cool about OS X and finding new things.

I have a client that has Dreamweaver templates and uses svn+ssh to connect to their web server. This doesn’t seem to be a super common setup. I remember trying to get it set up on my Windows 7 machine and it was a struggle. But once it was set up, I was good. Now, transferring this setup to my new Mac presented a new challenge. I spent about 4 hours getting it to work. I couldn’t do more than piece bits of information together so either we’re the only ones in the world using this particular set up or there isn’t any documentation about it (I’m guessing it’s this one). I’m sharing my experience and steps to hopefully help someone else out there.

The Adobe documentation didn’t help me much and judging by some of the posts I saw on the help forum I’m not alone. I will give credit where credit is due – the point about needing to use the same version of subversion on your computer as in Dreamweaver is VERY correct. That’s part of where I was getting stuck.

Check your version of subversion

First, you want to see what version of subversion you are using. I had 1.7 and Dreamweaver uses 1.6.9. If you have this set up, you will never successfully get your repositories set up.

You will need to use Terminal for a lot of this. If you don’t know where Terminal is, go to Launchpad -> Other and click on Terminal.

Once you have your Terminal window open, type in:

svn help

You should see something like this:

$ svn help
usage: svn  [options] [args]
Subversion command-line client, version 1.7.

If you have 1.6.9 already you don’t need to do this, but if you have 1.7+ and Adobe still hasn’t updated its subversion client, keep reading.

Next up, you may be installing a bunch of stuff.

Install Xcode

If you don’t already have it, you’ll need to download and install Xcode from the Mac App Store (don’t worry, it’s free) or the Apple developer website.

You may need to install the Command Line Developer Tools. These are available from the Apple developer site or in Xcode. I already had them installed.

Once you have both installed, you’ll need to return to Terminal and accept the license agreement:

$ xcodebuild -license

Install MacPorts

If you don’t already have it, you’ll need to download and install MacPorts.

Downgrade subversion

This article on downgrading subversion was very helpful but not entirely correct for what I needed. Here is an updated version:

Check what version you have installed already by typing this into your Terminal window:

$ port installed subversion

I didn’t have my current version of subversion in MacPorts. So when I ran this, I didn’t see 1.7 listed. Before I installed 1.6.9 with MacPorts it said I didn’t have any and then after I installed it only listed 1.6.9. You may very well see that you have none installed now and that’s okay!

You need version 1.6.9 to be compatible with Dreamweaver so type these commands into Terminal:

$ cd /tmp
$ svn co -r 62949
$ sudo port install

You’ll have to enter your password.

And, the install will fail. That’s okay. You’ll get an error message about not being able to find dependency for serf. Let’s fix that.

$ cd subversion
$ vi Portfile

You can use vi, nano, or whatever text editor you want here. I’m old school and still use vi.

Search for the line that says:

depends_lib port:expat port:neon \
 port:apr port:apr-util \
 port:db46 port:sqlite3 \
 port:gettext port:libiconv \
 port:serf port:cyrus-sasl2

Change port:serf to port:serf0

port:serf0 port:cyrus-sasl2

Then run the install command again.

$ sudo port install

And, it should work wonderfully. It will run for a bit, installing all the dependencies, so go get a cup of coffee, tea, or soda and come back in about 5 minutes.

Once it’s done:

$ port installed subversion
The following ports are currently installed:
 subversion @1.6.9_0 (active)

OK, now you have 1.6.9 installed! But we’re not quite ready to go yet.

Close Terminal and open it again. (And I mean close the program, not just the window.)

If you run svn help again, you should see:

$ svn help
usage: svn  [options] [args]
Subversion command-line client, version 1.6.9.

Now our subversion matches Dreamweaver!

Next up, we need to install a helper for ssh.

Install sshpass

If you are using a key pair to connect to your subversion server, you do not need to install sshpass. You should be able to follow the steps in this article to set them up.

In my case, I need to pass a plain text password to the server. I can’t use key pairs, which I know is the ideal configuration. That is how it is set up and until it changes there’s no way I’m going to enter the password manually every time I need to connect to the server – and there is no way to do that with Dreamweaver. Note: I know this method is not best practice. But sometimes you just have to go with how the server is set up. Please do not complain to me about this.

This article was super helpful for installing sshpass. Go through the steps detailed there and come back here.

Now we are ready to configure subversion.

Configure subversion

Back in Terminal, make sure you’re in your home directory:

$ cd

Then go into your subversion directory and edit your config file:

$ cd .subversion
$ vi config

You will want to find the line in [tunnels] that starts:

ssh = $SVN_SSH

Change it to:

ssh = $SVN_SSH /usr/local/bin/sshpass -p "your-password" ssh -o StrictHostKeyChecking=no

Replacing your-password with your actual password. No, this is not best practice. Yes, it makes me cringe. That’s how it is.

Save the config file and open up Dreamweaver.

Configuring Dreamweaver

Finally! We are almost done!

  1. In Dreamweaver, go to Site -> Manage Sites
  2. If you haven’t already created your site, click Add Site.Otherwise, click your site and then the pencil icon to edit it.If not already there, enter the Site Name and Local Site Folder.
  3. Skip Servers (if you have a test server, that’s great, you can set it up)
  4. Go to Version Control.
    For Access, select Subversion.
    For Protocol, select: SVN+SSH
    For Server Address, enter username@servername (where username is the SVN username and servername is the host name or IP address of the server)
    For Repository Path, enter the path to the repository you are setting up.
    Click the Test button.
    Hold your breath.

Hopefully you will see the glorious “Server and project are accessible” message!

Screen Shot 2014-06-24 at 2.30.09 PM

Click Done on Manage Sites.

Now, the real test is to right-click on your Site in the File viewer and click Version Control -> Get Latest Versions. That should download all of your files to your computer. You can exhale now!

If you struggled with this like I did, this is where you make yourself a large alcoholic beverage or buy yourself a cupcake or something. You deserve a treat!