<?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>Blog.Project13.pl &#187; gitosis</title>
	<atom:link href="http://www.blog.project13.pl/index.php/tag/gitosis/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.project13.pl</link>
	<description>The Blog of a Coder</description>
	<lastBuildDate>Sun, 05 Feb 2012 02:28:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Installing Git with Gitosis</title>
		<link>http://www.blog.project13.pl/index.php/project13/477/installing-git-with-gitosis/</link>
		<comments>http://www.blog.project13.pl/index.php/project13/477/installing-git-with-gitosis/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 15:22:40 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Project13]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[gitosis]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[webdeveloper]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=477</guid>
		<description><![CDATA[Git is really simple and VERY powerfull. It makes svn look like an idiot &#8211; but that&#8217;s just my personal opinion ;-) Anyways, I&#8217;m using github most of the time, but now I&#8217;d like to hava a non public repository (yet remote) for some small project. I&#8217;ve been commiting to a local git instance from [...]]]></description>
			<content:encoded><![CDATA[<p>Git is really simple and VERY powerfull. It makes svn look like an idiot &#8211; but that&#8217;s just my personal opinion ;-)</p>
<p>Anyways, I&#8217;m using github most of the time, but now I&#8217;d like to hava a non public repository (yet remote) for some small project. I&#8217;ve been commiting to a local git instance from the begining of this project so just pushing it into a new repo will be really simple.</p>
<p>I wanted to have som easy to administer localozed git to serve hit hosting for my friends etc. So this is how I did it:</p>
<p>On server:</p>
<div class="geshi no bash">
<div class="head"># do this as root of course</div>
<ol>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> ~<span class="sy0">/</span>src</div>
</li>
<li class="li1">
<div class="de1">git clone git:<span class="sy0">//</span>eagain.net<span class="sy0">/</span>gitosis.git</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> gitosis</div>
</li>
<li class="li1">
<div class="de1">.<span class="sy0">/</span>setup.py <span class="kw2">install</span></div>
</li>
<li class="li1">
<div class="de1">useradd git</div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#end of obvious stuff</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">gitosis-init <span class="sy0">&lt;</span> <span class="sy0">/</span>location<span class="sy0">/</span>of<span class="sy0">/</span>administrators<span class="sy0">/</span>public<span class="sy0">/</span>id_rsa.pub <span class="co0">#this will allow you to administer gitosis remotely</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">sudo</span> <span class="kw2">chmod</span> <span class="nu0">755</span> <span class="sy0">/</span>home<span class="sy0">/</span>git<span class="sy0">/</span>repositories<span class="sy0">/</span>gitosis-admin.git<span class="sy0">/</span>hooks<span class="sy0">/</span>post-update <span class="co0"># in case gitosis-init didn&#39;t do this already</span></div>
</li>
</ol>
</div>
<p>Now we can do all the administration without being logged in into our server &#8211; just by using git!
</pre>
<div class="geshi no bash">
<div class="head">#all of the following is done LOCALLY!</div>
<ol>
<li class="li1">
<div class="de1">git clone git<span class="sy0">@</span>stratos:gitosis-admin.git</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> gitosis-admin</div>
</li>
<li class="li1">
<div class="de1">vim gitosis.conf <span class="co0">#edit groups and repositories</span></div>
</li>
<li class="li1">
<div class="de1">writable = bla is responsible <span class="kw1">for</span> the repositories</div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#for example you could setup:</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#then just do the stuff you would normally do with git:</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#[group secret-group]</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#writable = bla</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#members = ktoso@homunculus ktoso@protos</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#here&#39;s how your dir structure should look like</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#├── gitosis.conf #repository configuration</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#└── keydir #put all (ssh) public keys of your users in here</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &nbsp; &nbsp;├── ktoso@homunculus.pub</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &nbsp; &nbsp;└── ktoso@protos.pub</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#now just do what you would normally do with a git repository</span></div>
</li>
<li class="li1">
<div class="de1">git add .</div>
</li>
<li class="li1">
<div class="de1">git commit -m <span class="st0">&#39;new repo: bla&#39;</span></div>
</li>
<li class="li1">
<div class="de1">git push</div>
</li>
</ol>
</div>
<p>You can then just pull/clone this repo:</p>
<pre lang="bash">git clone git://stratos/bla.git</pre>
<p>Yeah, this post isn't much of an discovery - yet I wanted to show you how SIMPLE and SCALABLE a simple git repository can be. For mor information about git and gitosis see: <a href="http://www.google.com/search?q=google+gitosis" onclick="urchinTracker('/outgoing/www.google.com/search?q=google+gitosis&amp;referer=');">a simple google search</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/project13/477/installing-git-with-gitosis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

