Posted by: max | November 30, 2009

SSH, SVN and Ubuntu Integration

Subversion Set Up With Windows on Ubuntu

1) Download Putty, Plink, and PuttyGen
2) Save them all somewhere on your path. (I suggest putting C:svnbin in your path, so that will work nicely)
3) Edit C:Documents and Settings{your username}Application DataSubversionconfig . Skip down to the portion of the file about tunnels. Right under the uncommented [tunnels] line, add this EXACTLY without the quotes: "ssh=plink"
4) Open PuttyGen. Hit generate new key, move mouse around like it instructs, get key generated. Copy it to the keyboard, hit Save Private Key, toss it somewhere convenient (I used C:Documents and Settings{your username}.ssh{slice name}.ppk
5) Open Putty. follow these directions exactly: your hostname is {your deployment logon}@{your hostname}. From the left hand pane, click SSH to expand it, go down to Auth, click Browse, navigate to the key file you saved in step #4, and open it. Now, back to the main screen of Putty, and save this session as a name, like "Dreaming".
6) Login to host using the session you just made. You should see it complain that the server rejected your key.
7) "mkdir ~.ssh" on host
8) echo "[click your right mouse button to paste in that key you copied earlier]" > ~.sshauthorized_keys

9) Log out.
10) Log back in using the same session from Putty. If your key was accepted (it will say [Authenticating with public key "rsa-key-{datestamp}"]), you win.
11) Edit config/deploy.rb on your localhost. Locate the line which says repository. Change it to

set :repository, "svn+ssh://{your login name}@{the SESSION NAME which you saved from step #5}/usr/local/svn/#{application}"

12) Back on your local machine, "cap setup_scm"

If you don’t see either "Couldn’t create tunnel" or "Failed to create transaction" near the bottom of all the stuff that sailed by, congrats, you’re probably set up with a newly checked out copy and an up-to-date repository.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.