<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Martin&#039;s World &#187; putty</title>
	<atom:link href="http://www.freakent.co.uk/archives/tag/putty/feed" rel="self" type="application/rss+xml" />
	<link>http://www.freakent.co.uk</link>
	<description>Martin&#039;s world of Gadgets, Internet and Technology</description>
	<lastBuildDate>Sun, 14 Feb 2010 16:22:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>svnsync with PuTTY on Windows</title>
		<link>http://www.freakent.co.uk/archives/131</link>
		<comments>http://www.freakent.co.uk/archives/131#comments</comments>
		<pubDate>Sat, 16 Feb 2008 08:12:22 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://www.freakent.co.uk/archives/131</guid>
		<description><![CDATA[Objective:
Maintain a copy of my local Subversion repository on my hosting server ready for deployment of my application using Capistrano.
Steps:

Create remote svn repository
Set up svn+ssh using PuTTY on Windows

Download plink.exe and puttygen.exe to you local machine.
run puttygen and generate a public/private key pair
Don&#8217;t set a pass phrase and svn will not prompt you for it [...]]]></description>
			<content:encoded><![CDATA[<p>Objective:</p>
<p>Maintain a copy of my local Subversion repository on my hosting server ready for deployment of my application using Capistrano.</p>
<p><span id="more-131"></span>Steps:</p>
<ol>
<li>Create remote svn repository</li>
<li>Set up svn+ssh using PuTTY on Windows
<ol>
<li>Download plink.exe and puttygen.exe to you local machine.</li>
<li>run puttygen and generate a public/private key pair<br />
Don&#8217;t set a pass phrase and svn will not prompt you for it later.</li>
<li>Save the private key to keyfile.ppk on your local hard disk.</li>
<li>On the remote host open a file ~/.ssh/authorized_keys and paste in the public key from puttygen.<br />
Make sure the string fits on a single continuous line.</li>
<li>In the file abov, pre-pend <em>command=&#8221;svnserve -t&#8221;</em> to the start of the public key.<br />
This forces the svnserve process to run when ever someone connects using this key pair. Having no passphrase on the key pair isn&#8217;t great for security but at least you are restricting access to just svn and not the whole shell.</li>
<li>On the local Windows machine, edit <em>%Application Data%\Subversion\config</em>, under the [tunnels] section add<br />
<em>[tunnels]</em><br />
<em>ssh =plink -i \path\to\keyfile.ppk<br />
(use back slashes / despite it being on Windows)<br />
</em></li>
<li>Test using <em>svn info svn+ssh://username@host.com/home/username/svn-repos/application</em></li>
</ol>
</li>
<li>Set up two environment variables to save on the typing<br />
<em>set torepos=svn+ssh://username@host.com/home/username/svn-repos/application<br />
set fromrepos=file:///s:/svn-repos</em></li>
<li>Initialise the synchronisation set up<br />
<em>svnsync init %torepos% %fromrepos%</em></li>
<li>Check the synchronisation parameters have been correctly set on the remote repository<br />
<em>svn proplist &#8211;revprop -r 0 %to%<br />
svn propget svn:sync-from-url &#8211;revprop -r 0 %torepos%</em></li>
<li>Now do the sync<br />
<em>svnsync sync %torepos%</em></li>
<li>Sit back and wait, or in my case, go to bed.</li>
</ol>
<p>Sources of inspiration:</p>
<ul>
<li><a href="http://journal.paul.querna.org/articles/2006/09/14/using-svnsync/">http://journal.paul.querna.org/articles/2006/09/14/using-svnsync/</a></li>
<li><a href="http://svnbook.red-bean.com/en/1.4/svn.reposadmin.maint.html#svn.reposadmin.maint.replication">http://svnbook.red-bean.com/en/1.4/svn.reposadmin.maint.html#svn.reposadmin.maint.replication</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.freakent.co.uk/archives/131/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
