<?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>Technology: Learn and Share &#187; Subversion</title>
	<atom:link href="http://crazytoon.com/category/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://crazytoon.com</link>
	<description>Enterprise level solutions, LAMP, Linux, Apache, MySQL, PHP, Perl, Windows, Cache, Optimization</description>
	<lastBuildDate>Fri, 16 Jul 2010 20:24:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SVN:  How do you use svn command line on Windows with ssh tunneling?</title>
		<link>http://crazytoon.com/2008/11/19/svn-how-do-you-use-svn-command-line-on-windows-with-ssh-tunneling/</link>
		<comments>http://crazytoon.com/2008/11/19/svn-how-do-you-use-svn-command-line-on-windows-with-ssh-tunneling/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 14:58:03 +0000</pubDate>
		<dc:creator>Sunny Walia</dc:creator>
				<category><![CDATA[Linux Apache MySQL PHP]]></category>
		<category><![CDATA[Linux Tips]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[System admin]]></category>
		<category><![CDATA[Windows System]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://crazytoon.com/?p=151</guid>
		<description><![CDATA[If you ever used svn command line, you know it is not optimal to type in your password every time you do checkout, checkin, info, etc.  In linux world, it is very easy to setup keys to get around this.  Of course in the world of Windows it is not as easy.  Here are the steps [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever used svn command line, you know it is not optimal to type in your password every time you do checkout, checkin, info, etc.  In linux world, it is very easy to <a title="SSH: setting up public key authentication over SSH" href="http://crazytoon.com/2007/08/05/ssh-setting-up-public-key-authentication-over-ssh-centos-redhat-linux-fedora/" target="_blank">setup keys</a> to get around this.  Of course in the world of Windows it is not as easy.  Here are the steps you need to follow to get private/public keys working with your SVN under Windows using ssh tunneling.</p>
<p><strong>Assumptions</strong>:  you will be connecting as user &#8220;root&#8221; to svn server located at &#8220;10.0.0.1&#8243;.  All your files will be saved at c:\ including your svn command line utility</p>
<p>First we will have to generate a key.  We can accomplish this by using a free utility called <a title="puttygen: free key generator" href="http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe" target="_blank">puttygen</a>.  Run puttygen and click on &#8220;Generate&#8221; button.  You will have a key similar to below example:</p>
<div id="attachment_153" class="wp-caption alignnone" style="width: 310px"><a href="http://crazytoon.com/wp-content/uploads/2008/11/puttygen_key.gif"><img class="size-medium wp-image-153" title="puttygen key example" src="http://crazytoon.com/wp-content/uploads/2008/11/puttygen_key-300x288.gif" alt="Example of a key generated by puttygen" width="300" height="288" /></a><p class="wp-caption-text">Example of a key generated by puttygen</p></div>
<p>Copy this, you will need it in few mins.  At this point, go ahead and create a private key by clicking on:  &#8220;Save private key&#8221;.  Save this as private.ppk on your C:\.  </p>
<p>Now let us log in to the svn server and add this public key to the authorized_keys2 (see <a title="SSH: setting up public key authentication over SSH" href="http://crazytoon.com/2007/08/05/ssh-setting-up-public-key-authentication-over-ssh-centos-redhat-linux-fedora/" target="_blank">setting up keys</a> for step by step instructions).  I will assume you are using &#8220;root&#8221; as login.</p>
<p><code>vi /root/.ssh/authorized_keys2</code></p>
<p>Make sure when you paste, it is not broken into different lines.  All of the key should be one line.</p>
<p>Ok now back to your Windows machine.  Now we need to set up ssh tunnel to our server.  There are few ways of doing this but for our purpose, we will use another free program provided by the same developers as puttygen: <a title="plink: used to create ssh tunnel" href="http://the.earth.li/~sgtatham/putty/latest/x86/plink.exe" target="_blank">download plink</a> to C:\.  If you do not do this step, you will get following error:</p>
<p><code>svn: Can't create tunnel: The system cannot find the file specified.</code></p>
<p>Ok let us set the variables for svn.  Go to command prompt and type (you can also set this in your scripts and inside windows environment.  But since this post is to show you an example, we will just do this):</p>
<p><code>set SVN_SSH="/plink.exe" -i /private.ppk -l root</code></p>
<p>Now let&#8217;s run this one time manually to cache key:</p>
<p><code>/plink.exe -i /private.ppk -l root 10.0.0.1</code></p>
<p>Press &#8220;y&#8221; when it asks you to save.  Type exit and get back to your prompt.</p>
<p>Ok now we can test our svn utility.</p>
<p><code>/svn info svn+ssh://10.0.0.1/svn/testrepo/trunk/</code></p>
<p>This should display output similar to:</p>
<p><code>Path: trunk<br />
URL: svn+ssh://10.0.0.1/svn/testrepo/trunk<br />
Repository Root: svn+ssh://10.0.0.1/svn/testrepo<br />
Repository UUID: b9143312-b1a1-11ba-a111-11cdcd1d2222<br />
Revision: 10<br />
Node Kind: directory<br />
Last Changed Author: root<br />
Last Changed Rev: 4<br />
Last Changed Date: 2008-11-18 15:18:47 -0800 (Tue, 18 Nov 2008)</code></p>
<p>Now you are ready to script your checkouts, do checkin&#8217;s with out having to type in your password, etc.</p>
<p>————————————-<br />
<small>DISCLAIMER: Please be smart and use code found on internet carefully. Make backups often. And yeah.. last but not least.. I am not responsible for any damage caused by this posting. <strong>Use at your own risk</strong>.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://crazytoon.com/2008/11/19/svn-how-do-you-use-svn-command-line-on-windows-with-ssh-tunneling/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Subversion:  What to do when your repository server moves to another ip?</title>
		<link>http://crazytoon.com/2008/06/02/subversion-what-to-do-when-your-repository-server-moves-to-another-ip/</link>
		<comments>http://crazytoon.com/2008/06/02/subversion-what-to-do-when-your-repository-server-moves-to-another-ip/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 23:14:42 +0000</pubDate>
		<dc:creator>Sunny Walia</dc:creator>
				<category><![CDATA[Linux Apache MySQL PHP]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Find]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://crazytoon.com/?p=81</guid>
		<description><![CDATA[This weekend our networking guys decided to change ips for all of our servers.  They also changed our subversion server&#8217;s ip.  This caused some issues in the subversion world with developers who had checkouts pointing to ips instead of hostname, using command similar to:
svn co svn+ssh://192.168.1.10/svn/myrepos/ /home/mycheckout/
Now when they do &#8220;svn update&#8221; inside [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend our networking guys decided to change ips for all of our servers.  They also changed our subversion server&#8217;s ip.  This caused some issues in the subversion world with developers who had checkouts pointing to ips instead of hostname, using command similar to:</p>
<p><code>svn co svn+ssh://192.168.1.10/svn/myrepos/ /home/mycheckout/</code></p>
<p>Now when they do &#8220;svn update&#8221; inside the their /home/mycheckout/ directory, they get an error:</p>
<p>We needed to point the checkout to the new ip.  Easiest way to do this is to delete your checkout and re-checkout.  Unfortunately, some of the developers had a lot of modified files which wasn&#8217;t checked in yet.  I fixed it by issuing:<br />
<code><br />
find /home/mycheckout  -name "entries"|xargs /usr/bin/perl -w -i -p -e "s/192.168.1.10/10.1.1.10/g"</code></p>
<p>Find command helps us in finding all the files with name &#8220;entries&#8221; and xargs takes the filename and passes it to perl.  To understand what perl command is doing, see <a title="http://crazytoon.com/2007/10/29/linux-how-do-i-mass-find-and-replace-text-in-files-under-linux-using-perl/ " href="http://http://crazytoon.com/2007/10/29/linux-how-do-i-mass-find-and-replace-text-in-files-under-linux-using-perl/" target="_blank">this post</a>.</p>
<p>Another method which may be preferred as mentioned in comments is:  svn switch  Only downside I see with this is that you have to remember what you used originally.  If you did checkout as user@192.168.1.10, you would have to pass that to the command below.</p>
<p>Syntax is:</p>
<p><code>svn switch --relocate svn+ssh://192.168.1.10 svn+ssh://10.1.1.10</code></p>
<p>I would suggest at this time you switch to using hostname instead of ip.</p>
]]></content:encoded>
			<wfw:commentRss>http://crazytoon.com/2008/06/02/subversion-what-to-do-when-your-repository-server-moves-to-another-ip/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
