<?xml version="1.0" encoding="iso-8859-1"?>
<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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>Enquanto isso, na repartição... &#187; Nerdocracia</title>
	<atom:link href="http://www.burocrata.org/blog/archives/category/nerdocracia/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.burocrata.org/blog</link>
	<description>Relatos do maldito burocrata pigmeu</description>
	<lastBuildDate>Sun, 12 Jun 2011 19:17:40 +0000</lastBuildDate>
	<language>pt-br</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.5/br/</creativeCommons:license>		<item>
		<title>Private GIT repositories (on DreamHost)</title>
		<link>http://www.burocrata.org/blog/archives/2010/11/08/345/private-git-repositories-on-dreamhost/</link>
		<comments>http://www.burocrata.org/blog/archives/2010/11/08/345/private-git-repositories-on-dreamhost/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 00:58:32 +0000</pubDate>
		<dc:creator>MaCa</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Nerdocracia]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.burocrata.org/blog/?p=345</guid>
		<description><![CDATA[This is yet another guide describing how to setup private HTTP-accessible Git repositories on Dreamhost using Git's git-http-backend (a.k.a git's Smart HTTP protocol). While similar guides can easily be found by the thousands in the Web (I've listed some of them in the Refereces section), I've found that some guides have outdated information or that the setup described in them could be improved. Thus, this guide tries to update, improve and consolidate the information dispersed in such sources.]]></description>
			<content:encoded><![CDATA[<p>This is yet another guide describing how to setup private HTTP-accessible Git repositories on Dreamhost using Git&#8217;s git-http-backend (a.k.a git&#8217;s Smart HTTP protocol). While similar guides can easily be found by the thousands in the Web (I&#8217;ve listed some of them in the Refereces section), I&#8217;ve found that some guides have outdated information or that the setup described in them could be improved. Thus, this guide tries to update, improve and consolidate the information dispersed in such sources.</p>
<p><span id="more-345"></span></p>

<div class="note" style="border: 1px solid black;">
<p class="admonition-title"><strong>Notice:</strong></p>
<p>the original guide is available at <a href="http://github.com/tmacam/private-git-on-dreamhost">http://github.com/tmacam/private-git-on-dreamhost</a>. Nevertheless, its content as on 2010-11-08, is presented bellow.</p></div>

<h3 class="title">Private GIT repositories (on DreamHost)</h3>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Author:</th>
<td>Tiago Alves Macambira</td></tr>
<tr class="field"><th class="docinfo-name">Licence:</th><td class="field-body">Creative Commons By-SA</td>
</tr>
</tbody>
</table>
<div class="contents topic" id="table-of-contents">
<p class="topic-title first">Table of Contents</p>
<ul class="auto-toc simple">
<li><a class="reference internal" href="#introduction" id="id10">1&nbsp;&nbsp;&nbsp;Introduction</a><ul class="auto-toc">
<li><a class="reference internal" href="#assumptions-and-requirements" id="id11">1.1&nbsp;&nbsp;&nbsp;Assumptions and requirements</a></li>
<li><a class="reference internal" href="#about-this-document" id="id12">1.2&nbsp;&nbsp;&nbsp;About this document</a></li>
</ul>
</li>
<li><a class="reference internal" href="#installation" id="id13">2&nbsp;&nbsp;&nbsp;Installation</a><ul class="auto-toc">
<li><a class="reference internal" href="#install-git" id="id14">2.1&nbsp;&nbsp;&nbsp;Install Git</a></li>
<li><a class="reference internal" href="#create-the-directory-where-your-repositories-will-live" id="id15">2.2&nbsp;&nbsp;&nbsp;Create the directory where your repositories will live</a></li>
<li><a class="reference internal" href="#setup-the-bare-repository-creation-script" id="id16">2.3&nbsp;&nbsp;&nbsp;Setup the bare repository creation script</a></li>
<li><a class="reference internal" href="#apache-setup" id="id17">2.4&nbsp;&nbsp;&nbsp;Apache Setup</a><ul class="auto-toc">
<li><a class="reference internal" href="#setup-your-htaccess" id="id18">2.4.1&nbsp;&nbsp;&nbsp;Setup your .htaccess</a></li>
<li><a class="reference internal" href="#setup-git-http-backend-for-your-repositories" id="id19">2.4.2&nbsp;&nbsp;&nbsp;Setup git-http-backend for your repositories</a></li>
<li><a class="reference internal" href="#password-protect-your-repository" id="id20">2.4.3&nbsp;&nbsp;&nbsp;Password-protect your repository</a></li>
<li><a class="reference internal" href="#setup-gitweb" id="id21">2.4.4&nbsp;&nbsp;&nbsp;Setup GitWeb</a><ul class="auto-toc">
<li><a class="reference internal" href="#retrieving-and-installing" id="id22">2.4.4.1&nbsp;&nbsp;&nbsp;Retrieving and installing</a></li>
<li><a class="reference internal" href="#setting-up-gitweb" id="id23">2.4.4.2&nbsp;&nbsp;&nbsp;Setting up GitWeb</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#troubleshooting" id="id24">2.5&nbsp;&nbsp;&nbsp;Troubleshooting</a><ul class="auto-toc">
<li><a class="reference internal" href="#disable-authentication" id="id25">2.5.1&nbsp;&nbsp;&nbsp;Disable authentication</a></li>
<li><a class="reference internal" href="#use-info-cgi-script-to-check-cgi-script-s-environment" id="id26">2.5.2&nbsp;&nbsp;&nbsp;Use info.cgi script to check CGI script's environment</a></li>
<li><a class="reference internal" href="#check-the-server-logs" id="id27">2.5.3&nbsp;&nbsp;&nbsp;Check the server logs</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#usage" id="id28">3&nbsp;&nbsp;&nbsp;Usage</a><ul class="auto-toc">
<li><a class="reference internal" href="#creating-new-bare-repositories" id="id29">3.1&nbsp;&nbsp;&nbsp;Creating new bare repositories</a></li>
<li><a class="reference internal" href="#cloning-an-empty-repository" id="id30">3.2&nbsp;&nbsp;&nbsp;Cloning an empty repository</a></li>
<li><a class="reference internal" href="#pushing-to-a-new-empty-repository" id="id31">3.3&nbsp;&nbsp;&nbsp;Pushing to a new empty repository</a></li>
</ul>
</li>
<li><a class="reference internal" href="#final-remarks" id="id32">4&nbsp;&nbsp;&nbsp;Final remarks</a></li>
<li><a class="reference internal" href="#todos" id="id33">5&nbsp;&nbsp;&nbsp;TODOs</a></li>
<li><a class="reference internal" href="#references" id="id34">6&nbsp;&nbsp;&nbsp;References</a></li>
</ul>
</div>
<div class="section" id="introduction">
<h3><a class="toc-backref" href="#id10">1&nbsp;&nbsp;&nbsp;Introduction</a></h3>
<p>This is <em>yet another</em> guide describing how to setup private
HTTP-accessible Git repositories on <a class="reference external" href="http://www.dreamhost.com">Dreamhost</a> using Git's
<tt class="docutils literal"><span class="pre">git-http-backend</span></tt> (a.k.a git's <a class="reference external" href="http://progit.org/2010/03/04/smart-http.html">Smart HTTP protocol</a>). While
similar guides can easily be found by the thousands in the Web (I've
listed some of them in the Refereces section), I've found that some
guides have outdated information or that the setup described in
them could be improved. Thus, this guide tries to update, improve and
consolidate the information dispersed in such sources.</p>
<p>Some might ask "Why on Earth would someone opt to create its own
private Git hosting solution while better offerings are available from
sites such as, let's say, <a class="reference external" href="http://github.com">GitHub</a>?" As the guy <a class="reference external" href="http://railstips.org/blog/archives/2008/11/23/gitn-your-shared-host-on/">from RailsTips
pointed out in one of his articles</a>, sometimes you don't need or
don't want to "share" a project with anyone but yourself and
paying for a <a class="reference external" href="http://github.com">GitHub</a>-like service might just not make sense.  If
that's your case, than this guide is for you.</p>
<p>While aimed at a <a class="reference external" href="http://www.dreamhost.com">Dreamhost</a>-hosted accounts and the environment such
accounts have as of 2010-10-17, I believe the process described here
can be used in other hosting providers as well.</p>
<p>It is important to highlight that one of the objectives of this guide
is to describe a process that:</p>
<ul class="simple">
<li>should be easy to perform by just renaming or editing this guide's
companion files and</li>
<li>once complete, can be easily be reused to generate other "collection
of repositories", with different URLs and passwords.</li>
</ul>
<div class="section" id="assumptions-and-requirements">
<h4><a class="toc-backref" href="#id11">1.1&nbsp;&nbsp;&nbsp;Assumptions and requirements</a></h4>
<ul>
<li><p class="first">No WebDav or SSH support is needed nor used for serving Git repositories.</p>
<p>Once again, the focus is on HTTP access using
<tt class="docutils literal"><span class="pre">git-http-backend</span></tt>. As for SSH, guides describing how to setup a
similar environment for SSH-accessible repositories can be found
easily on the web.</p>
</li>
<li><p class="first">Repositories will be password protected and available for both
reading and writting.</p>
<p>As we will explain latter, in the <a class="reference internal" href="#setup-git-http-backend-for-your-repositories">Setup git-http-backend for your
repositories</a> section, we will have to password-protect our
repositories in order to be able to <tt class="docutils literal">git push</tt> to them through HTTP.</p>
</li>
<li><p class="first">We will stick to a <a class="reference external" href="http://en.wikipedia.org/wiki/Don't_repeat_yourself">DRY</a> (Don't Repeat Yourself) philosophy.</p>
<p>Thus, we want configuration options to be repeated in as few places
as possible. We will use environment variables in Apache
configuration files to do this. If this makes you uncomfortable,
well, you can always manually spread configuration options all over
the place. <img src='http://www.burocrata.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Your call.</p>
</li>
<li><p class="first">The web server being used is Apache.</p>
<p>Well, that is what <a class="reference external" href="http://www.dreamhost.com">Dreamhost</a> allows me to use so that is going to
be the focus of this guide. While it should not be that difficult to
port the settings here to something suitable for another web server,
describing how to do it is out of the scope of this guide.</p>
</li>
<li><p class="first">We are able to run CGI scripts.</p>
<p><a class="reference external" href="http://wiki.dreamhost.com/CGI">DreamHosts puts some restrictions</a>
on how a CGI script can be executed and the environment where it
runs. We will abide to those restrictions.</p>
</li>
</ul>
<ul>
<li><p class="first"><tt class="docutils literal">ScriptAlias</tt> is not allowed by the web server.</p>
<p>The instructions given in <a class="reference external" href="http://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html">git-http-backend</a> manpage will not work as
they use <tt class="docutils literal">ScriptAlias</tt>. The idea is to use common CGI scripts and
<tt class="docutils literal">mod_rewrite</tt> instead, roughly following the ideas presented in
<a class="reference external" href="http://wiki.dreamhost.com/Git#Smart_HTTP">http://wiki.dreamhost.com/Git#Smart_HTTP</a> .</p>
</li>
<li><p class="first"><a class="reference external" href="http://wiki.dreamhost.com/Suexec">SuExec</a> is used to run CGI scripts.</p>
<p>Notice that, as stated in DreamHost page on CGI, <tt class="docutils literal">SuExec</tt> "<em>wipes out all
environment variables that don't start with HTTP_"</em>. All our
env. vars. will have this prefix.</p>
</li>
<li><p class="first">Your private git repositories will be accessible in a subpath of your
domain.</p>
<p>The idea is that your private git repos will be available in an
address such as <strong>http://www.example.tld/corporate-git/</strong>. Adapting
the instructions bellow so you can serve them from the root of a
domain of its own, say <strong>http://corporate-git.example.tld</strong> should
be fairly simple.</p>
</li>
</ul>
</div>
<div class="section" id="about-this-document">
<h4><a class="toc-backref" href="#id12">1.2&nbsp;&nbsp;&nbsp;About this document</a></h4>
<p>This document and its companion files are initially hosted on
<a class="reference external" href="http://github.com/tmacam/private-git-on-dreamhost">http://github.com/tmacam/private-git-on-dreamhost</a>.</p>
<p>The file <tt class="docutils literal">README.rst</tt> is generated from <tt class="docutils literal"><span class="pre">README-real.rst</span></tt>.  So, if
you plan on doing any updates or fixes, <tt class="docutils literal"><span class="pre">README-real.rst</span></tt> is the
file you ought to edit. Just run <tt class="docutils literal">make</tt> afterwards in order to get
<tt class="docutils literal">README.rst</tt> updated as well. This is done because I wanted to use
<a class="reference external" href="http://github.com">GitHub</a>'s automatic rendering of README files but I didn't want to
just paste the contents of the companion files in this <tt class="docutils literal">README.rst</tt>
and risk getting the Guide and files out of sync.  Unfortunately,
GitHub does not allow the use of RestructuredText's <tt class="docutils literal">include</tt>
directive, so I had to fake it -- and here is the reason why we have
<tt class="docutils literal"><span class="pre">README-real.rst</span></tt>.</p>
<p>This guide is distributed under the Creative Common BY-SA license while
companion files are distributed under a MIT License.</p>
</div>
</div>
<div class="section" id="installation">
<h3><a class="toc-backref" href="#id13">2&nbsp;&nbsp;&nbsp;Installation</a></h3>
<p>All the commands and instructions given bellow should be performed on
the machine in Dreamhost where your account is installed. So ssh to it
and let's start.</p>
<div class="section" id="install-git">
<h4><a class="toc-backref" href="#id14">2.1&nbsp;&nbsp;&nbsp;Install Git</a></h4>
<p>Well, this should probably be a non-issue since git comes
pre-installed on most Dreamhost machines. To verify it:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">git</span> <span style="color: #660033;">--version</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> version 1.7.1.1</pre></div></div>



<p>As you see, the box that serves my domain in dreamhost has git version
1.7.1.1 installed. <a class="reference external" href="http://progit.org/2010/03/04/smart-http.html">Anything greater than 1.6.6 shall do</a>.</p>
<p>If you don't have git installed in you box, have an old version or if
for some other reason your need to compile git, follow Craig's instructions in
<a class="reference external" href="http://craigjolicoeur.com/blog/hosting-git-repositories-on-dreamhost">Hosting Git Repositories on Dreamhost</a>.</p>
</div>
<div class="section" id="create-the-directory-where-your-repositories-will-live">
<h4><a class="toc-backref" href="#id15">2.2&nbsp;&nbsp;&nbsp;Create the directory where your repositories will live</a></h4>
<p>It should reside somewhere not accessible from the web or directly
served by the web server. We will tell Apache and <tt class="docutils literal"><span class="pre">git-http-backend</span></tt>
how to properly and securely serve those repositories latter. For now,
we want them protected from third parties.</p>
<p>Say we decided to store them in <tt class="docutils literal">~/private_repos/</tt>. We will refer to
this directly by <tt class="docutils literal">GIT_REPOS_ROOT</tt> in the rest of this guide. Create
this directory and protect it against filesystem access from others:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">GIT_REPOS_ROOT</span>=<span style="color: #ff0000;">&quot;~/private_repos/&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #800000;">${GIT_REPOS_ROOT}</span>
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">711</span> <span style="color: #800000;">${GIT_REPOS_ROOT}</span></pre></div></div>



</div>
<div class="section" id="setup-the-bare-repository-creation-script">
<h4><a class="toc-backref" href="#id16">2.3&nbsp;&nbsp;&nbsp;Setup the bare repository creation script</a></h4>
<p>We will use the script <tt class="docutils literal">newgit.sh</tt>, presented bellow, to create new
repositories <a class="footnote-reference" href="#id7" id="id5">[1]</a> <a class="footnote-reference" href="#id8" id="id6">[2]</a> . Remember to modify
the value of the GIT_REPOS_ROOT variable in it to match our setup:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># this script is based on code from the following blog post</span>
<span style="color: #666666; font-style: italic;"># http://arvinderkang.com/2010/08/25/hosting-git-repositories-on-dreamhost/</span>
<span style="color: #666666; font-style: italic;"># and http://gist.github.com/73622</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">-e</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;"># Please, configure a default GIT_REPOS_ROOT to match your config</span>
<span style="color: #666666; font-style: italic;">#GIT_REPOS_ROOT=&quot;~/private_repos/&quot;</span>
&nbsp;
<span style="color: #007800;">DEFAULT_DESCRIPTION</span>=<span style="color: #ff0000;">'no description :('</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;"># describe how the script works</span>
usage<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Usage: $0 [ -h ] [ -r directory] [ -d description ] [ -n projectname ]&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;If no projectname is given, the name of the parent folder will be used as project name.&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;  -r directory   : (root) directory holding your git repositories&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;  -d description : description for gitweb&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;  -h             : print this screen&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;  -n name        : name of the project (should end in .git)&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #007800;">DESCRIPTION</span>=<span style="color: #800000;">${DEFAULT_DESCRIPTION}</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># evaluate the options passed on the command line</span>
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">getopts</span> r:d:n:h option
<span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${option}</span>&quot;</span>
  <span style="color: #000000; font-weight: bold;">in</span>
    r<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">GIT_REPOS_ROOT</span>=<span style="color: #800000;">${OPTARG}</span><span style="color: #000000; font-weight: bold;">;;</span>
    d<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">DESCRIPTION</span>=<span style="color: #800000;">${OPTARG}</span><span style="color: #000000; font-weight: bold;">;;</span>
    n<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #007800;">REPONAME</span>=<span style="color: #800000;">${OPTARG}</span><span style="color: #000000; font-weight: bold;">;;</span>
    h<span style="color: #7a0874; font-weight: bold;">&#41;</span> usage
      <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">;;</span>
  <span style="color: #000000; font-weight: bold;">esac</span>
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># check if repositories directory is given and is accessible</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #007800;">$GIT_REPOS_ROOT</span>  <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    usage
    <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$GIT_REPOS_ROOT</span>  <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;ERROR: '<span style="color: #007800;">${GIT_REPOS_ROOT}</span>' is not a directory&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span>
    usage
    <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;"># check if name of repository is given. if not, use folder name</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #007800;">$REPONAME</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #007800;">REPONAME</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">basename</span> <span style="color: #007800;">$PWD</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Add .git at and if needed</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$REPONAME</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-q</span> <span style="color: #ff0000;">'\.git$'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #007800;">REPONAME</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${REPONAME}</span>.git&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Ready to go</span>
<span style="color: #666666; font-style: italic;">#</span>
&nbsp;
&nbsp;
<span style="color: #007800;">REP_DIR</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${GIT_REPOS_ROOT}</span>/<span style="color: #007800;">${REPONAME}</span>&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #800000;">${REP_DIR}</span>
<span style="color: #7a0874; font-weight: bold;">pushd</span> <span style="color: #800000;">${REP_DIR}</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> <span style="color: #660033;">--bare</span> init
<span style="color: #c20cb9; font-weight: bold;">git</span> <span style="color: #660033;">--bare</span> update-server-info
<span style="color: #c20cb9; font-weight: bold;">cp</span> hooks<span style="color: #000000; font-weight: bold;">/</span>post-update.sample hooks<span style="color: #000000; font-weight: bold;">/</span>post-update
<span style="color: #c20cb9; font-weight: bold;">chmod</span> a+x hooks<span style="color: #000000; font-weight: bold;">/</span>post-update
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$DESCRIPTION</span> <span style="color: #000000; font-weight: bold;">&gt;</span> description
<span style="color: #666666; font-style: italic;"># This mark the repository as exportable.</span>
<span style="color: #666666; font-style: italic;"># For more info refer to git-http-backend manpage</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> git-daemon-export-ok
<span style="color: #7a0874; font-weight: bold;">popd</span>
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></div></div>



<p>Move or copy this file to an appropriate path (say, your home
directory would be fine) and turn it into an executable:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> u+x ~<span style="color: #000000; font-weight: bold;">/</span>newgit.sh</pre></div></div>



<table class="docutils footnote" frame="void" id="id7" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id5">[1]</a></td><td>This script is based in <a class="reference external" href="http://gist.github.com/73622">http://gist.github.com/73622</a></td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id8" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id6">[2]</a></td><td>Other guides prefer to use something similar wrapped as a Bash
function but I'd rather have it as a script</td></tr>
</tbody>
</table>
</div>
<div class="section" id="apache-setup">
<h4><a class="toc-backref" href="#id17">2.4&nbsp;&nbsp;&nbsp;Apache Setup</a></h4>
<p>Now, let's configure Apache to securely serve those repositories.</p>
<div class="section" id="setup-your-htaccess">
<h5><a class="toc-backref" href="#id18">2.4.1&nbsp;&nbsp;&nbsp;Setup your .htaccess</a></h5>
<p>As we stated in <a class="reference internal" href="#assumptions-and-requirements">Assumptions and requirements</a>, we want to serve our files from
<strong>http://www.example.tld/corporate-git/</strong>. So, go to the directory
holding your domain files (<tt class="docutils literal">~/www.example.tld</tt>, in our exemple),
create a <tt class="docutils literal"><span class="pre">corporate-git</span></tt> directory in it if it doesn't exist yet and create
a <tt class="docutils literal">.htaccess</tt> file in it:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>www.example.tld
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> corporate-git
<span style="color: #7a0874; font-weight: bold;">cd</span> corporate-git
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">GIT_WEB_DIR</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">pwd</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #666666; font-style: italic;"># we will use it in latter steps</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> .htaccess
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">644</span> .htaccess</pre></div></div>



<p>Now, edit this <tt class="docutils literal">.htaccess</tt> contents to match the text presented
bellow or just copy the contents of the file <tt class="docutils literal"><span class="pre">model-htaccess</span></tt> into
it and adapt it to match your config:</p>


<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">Options</span> +<span style="color: #0000ff;">Indexes</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># GIT BEGIN ###########################################################</span>
&nbsp;
<span style="color: #00007f;">SetEnv</span> HTTP_GIT_PROJECT_ROOT /home/<span style="color: #00007f;">user</span>/private_repos/
<span style="color: #00007f;">SetEnv</span> HTTP_GITWEB_CONFIG /home/<span style="color: #00007f;">user</span>/private_repos/gitweb_config.perl
&nbsp;
&nbsp;
<span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">On</span>
<span style="color: #00007f;">DirectoryIndex</span>  gitweb_wrapper.cgi
<span style="color: #adadad; font-style: italic;"># The following two rules can be used instead of DirectoryIndex</span>
<span style="color: #adadad; font-style: italic;">#RewriteRule ^$  gitweb_wrapper.cgi/ [L,E=SCRIPT_URL:/$1]</span>
<span style="color: #adadad; font-style: italic;">#RewriteRule ^([?].*)$ gitweb_wrapper.cgi/ [L,E=SCRIPT_URL:/$1]</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># Everything else that is not a file is forwarded to git-http-backend</span>
<span style="color: #00007f;">RewriteCond</span> %{REQUEST_FILENAME} !-f
<span style="color: #00007f;">RewriteRule</span> ^([^?].+)$ git-http-backend-private.cgi/$1
&nbsp;
&nbsp;
<span style="color: #adadad; font-style: italic;"># GIT END ############################################################</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># AUTHENTICATION BEGIN ###############################################</span>
<span style="color: #00007f;">AuthType</span> Digest
<span style="color: #00007f;">AuthName</span> <span style="color: #7f007f;">&quot;Private Git Repository Access&quot;</span>
<span style="color: #adadad; font-style: italic;"># UNCOMMENT THE LINE BELLOW FOR BETTER PERFORMANCE</span>
<span style="color: #adadad; font-style: italic;"># AuthDigestDomain /corporate-git/</span>
<span style="color: #00007f;">AuthUserFile</span> /home/<span style="color: #00007f;">user</span>/private_repos/.htpasswd
<span style="color: #00007f;">Require</span> valid-<span style="color: #00007f;">user</span>
<span style="color: #adadad; font-style: italic;"># AUTHENTICATION END  ################################################</span></pre></div></div>



<p>For now we will focus on the area between the <tt class="docutils literal"># GIT BEGIN</tt> and <tt class="docutils literal">#
GIT END</tt> blocks.  Modify <tt class="docutils literal">HTTP_GIT_PROJECT_ROOT</tt> to match you setup:
it should point to the <strong>full path</strong> where you store your private
repositories. Just expand the value of <tt class="docutils literal">GIT_REPOS_ROOT</tt> to get this
information:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #800000;">${GIT_REPOS_ROOT}</span>; <span style="color: #7a0874; font-weight: bold;">pwd</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>user<span style="color: #000000; font-weight: bold;">/</span>private_repos<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>



<p>So, in our example, <tt class="docutils literal">HTTP_GIT_PROJECT_ROOT</tt> value should be set to
<tt class="docutils literal">/home/user/private_repos/</tt>, as presented in the example above.</p>
</div>
<div class="section" id="setup-git-http-backend-for-your-repositories">
<h5><a class="toc-backref" href="#id19">2.4.2&nbsp;&nbsp;&nbsp;Setup git-http-backend for your repositories</a></h5>
<p>Not we will create a CGI script that will invoke
<tt class="docutils literal"><span class="pre">git-http-backend</span></tt>. In your <tt class="docutils literal">.htaccess</tt> this script is referred as
<tt class="docutils literal"><span class="pre">git-http-backend-private.cgi</span></tt>. Create it in the same directory
where you <tt class="docutils literal">.htaccess</tt> is by coping the one that comes with this guide
to that directory or by creating an empty file with the following
contents:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">GIT_HTTP_EXPORT_ALL</span>=<span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">GIT_PROJECT_ROOT</span>=<span style="color: #800000;">${HTTP_GIT_PROJECT_ROOT:?HTTP_GIT_PROJECT_ROOT env. variable not set. Aborting.}</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>git-core<span style="color: #000000; font-weight: bold;">/</span>git-http-backend</pre></div></div>



<p>Turn it into an executable file:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> git-http-backend-private.cgi</pre></div></div>



<div class="attention">
<p class="first admonition-title">Attention!</p>
<p class="last">You may need to update the path to <tt class="docutils literal"><span class="pre">git-http-backend</span></tt> executable
if git was installed in a non-default location.</p>
</div>
<p>And that's it. No need to setup anything: all the settings this
scripts are passed to it through environment variables set by Apache
and defined in the <tt class="docutils literal">.htaccess</tt> file.</p>
<p>From this point on you should be able to create repositories from the
command line and
access them through HTTP, but they will be
<strong>read-only</strong>. As stated in <a class="reference external" href="http://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html">git-http-backend</a> manpage, "<em>by default,
only the ``upload-pack`` service is enabled, which serves git ``fetch-pack``
and git ls-remote clients, which are invoked from ``git fetch``, ``git pull``,
and ``git clone``</em>". For <strong>write access</strong>, i.e., to be able to perform a
<tt class="docutils literal">git push</tt>, the <tt class="docutils literal"><span class="pre">receive-pack</span></tt> service is needed, and it <strong>is only
enabled when the client is authenticated</strong>.</p>
</div>
<div class="section" id="password-protect-your-repository">
<h5><a class="toc-backref" href="#id20">2.4.3&nbsp;&nbsp;&nbsp;Password-protect your repository</a></h5>
<p>We are almost set. Let's configure password protection for this whole
thing.  We will focus on the latter part of your <tt class="docutils literal">.htaccess</tt>, the one
between <tt class="docutils literal"># AUTHENTICATION BEGIN</tt> and <tt class="docutils literal"># AUTHENTICATION END</tt> that we
reproduce bellow:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># AUTHENTICATION BEGIN ########################</span>
AuthType Digest
AuthName <span style="color: #ff0000;">&quot;Private Git Repository Access&quot;</span>
AuthUserFile <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>user<span style="color: #000000; font-weight: bold;">/</span>private_repos<span style="color: #000000; font-weight: bold;">/</span>.htpasswd
Require valid-user
<span style="color: #666666; font-style: italic;"># AUTHENTICATION END  #########################</span></pre></div></div>



<p>You will have to create the password file pointed by <tt class="docutils literal">AuthUserFile</tt>
and use the <tt class="docutils literal">htdigest</tt> tool to add a user to this file</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>user<span style="color: #000000; font-weight: bold;">/</span>private_repos<span style="color: #000000; font-weight: bold;">/</span>.htpasswd
htdigest <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>user<span style="color: #000000; font-weight: bold;">/</span>private_repos<span style="color: #000000; font-weight: bold;">/</span>.htpasswd <span style="color: #ff0000;">&quot;Private Git Repository Access&quot;</span> username</pre></div></div>



<p>You will be prompted for a password. And that's it.</p>
<p>Notice:</p>
<ul class="simple">
<li>we are using <a class="reference external" href="http://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#using">Digest Authentication</a>. It
is supposed to be more secure than plain authentication.</li>
<li>The password file should be keep in a place not directly accessible
from the web. Ideally it should not even be placed in the directory
to be served by <tt class="docutils literal"><span class="pre">git-http-backend</span></tt> but I'm lazy and I hope this
will be enough. <img src='http://www.burocrata.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>If you update the value of the <tt class="docutils literal">AuthName</tt> setting you <strong>must</strong>
also change the 2nd. parameter passed to <tt class="docutils literal">htdigest</tt>, i.e., the
<em>Realm</em>, as <a class="reference external" href="http://www.freebsdwiki.net/index.php/Apache,_Digest_Authentication">they must match</a>!
Odd, I know. But that's the way it is.</li>
</ul>
</div>
<div class="section" id="setup-gitweb">
<h5><a class="toc-backref" href="#id21">2.4.4&nbsp;&nbsp;&nbsp;Setup GitWeb</a></h5>
<p>If you followed this guide up to this point than you are able to use
your repositories with git with no major issues. But you will not be
able to browse them with a web browser, retrieve the list of
repositories you have, see diffs, commit messages nor nothing like
that. To make things better, let's install GitWeb, another CGI
interface that will provide a web interface that allows to do all
those things I just said you couldn't.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">Most of the content in this section comes from  Kang's <a class="reference external" href="http://arvinderkang.com/2010/08/25/hosting-git-repositories-on-dreamhost/">Hosting Git repositories on Dreamhost</a>.</p>
</div>
<div class="section" id="retrieving-and-installing">
<h6><a class="toc-backref" href="#id22">2.4.4.1&nbsp;&nbsp;&nbsp;Retrieving and installing</a></h6>
<p>GitWeb comes in the same source package as git itself. Unfortunately,
Dreamhost doesn't install it by default so we will have to install it
manually ourselves. Do your remember what is your git version? No?
Find it all:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> <span style="color: #660033;">--version</span></pre></div></div>



<p>Go to <a class="reference external" href="http://git-scm.com/">git homepage</a> and download the corresponding source
package. In my example, in which my git version is 1.7.1.1, I would
need to grab the <tt class="docutils literal"><span class="pre">git-1.7.1.1.tar.gz</span></tt> source package:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~ <span style="color: #666666; font-style: italic;"># Yep, we will download it in our home directory</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.kernel.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>software<span style="color: #000000; font-weight: bold;">/</span>scm<span style="color: #000000; font-weight: bold;">/</span>git<span style="color: #000000; font-weight: bold;">/</span>git-1.7.1.1.tar.gz</pre></div></div>



<p>Unpack it, build GitWeb:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf git-1.7.1.1.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> git-1.7.1.1
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #007800;">prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin gitweb<span style="color: #000000; font-weight: bold;">/</span>gitweb.cgi
<span style="color: #c20cb9; font-weight: bold;">rm</span> gitweb<span style="color: #000000; font-weight: bold;">/</span>gitweb.perl <span style="color: #666666; font-style: italic;"># we won't need it</span></pre></div></div>



<p>We will install it into <tt class="docutils literal">~/gitweb/</tt>:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">GITWEB_INSTALL_DIR</span>=<span style="color: #ff0000;">&quot;~/gitweb&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-r</span> gitweb <span style="color: #800000;">${GITWEB_INSTALL_DIR}</span></pre></div></div>



<p>We are almost there.</p>
</div>
<div class="section" id="setting-up-gitweb">
<h6><a class="toc-backref" href="#id23">2.4.4.2&nbsp;&nbsp;&nbsp;Setting up GitWeb</a></h6>
<p>Now, copy all the GitWeb's media files into the directory
where your <tt class="docutils literal">.htaccess</tt> is:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #800000;">${GITWEB_INSTALL_DIR}</span><span style="color: #000000; font-weight: bold;">/*</span>.<span style="color: #7a0874; font-weight: bold;">&#123;</span>css,png,js<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #800000;">${GIT_WEB_DIR}</span>
<span style="color: #666666; font-style: italic;"># in this example, GIT_WEB_DIR points</span>
<span style="color: #666666; font-style: italic;"># to ~/www.example.tld/corporate-git</span></pre></div></div>



<p>Get back to where your <tt class="docutils literal">.htaccess</tt> file is
(i.e. <tt class="docutils literal">GIT_WEB_DIR</tt>). We will create a wrapper CGI for
GitWeb. Just copy <tt class="docutils literal">gitweb_wrapper.cgi</tt> or create an empty file with
the contents bellow:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">GITWEB_CONFIG</span>=<span style="color: #800000;">${HTTP_GITWEB_CONFIG:?HTTP_GITWEB_CONFIG env. variable not set. Aborting.}</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">GIT_PROJECT_ROOT</span>=<span style="color: #800000;">${HTTP_GIT_PROJECT_ROOT:?HTTP_GIT_PROJECT_ROOT env. variable not set. Aborting.}</span>
&nbsp;
<span style="color: #800000;">${HOME}</span><span style="color: #000000; font-weight: bold;">/</span>gitweb<span style="color: #000000; font-weight: bold;">/</span>gitweb.cgi</pre></div></div>



<p>Turn it into an executable file:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> gitweb_wrapper.cgi</pre></div></div>



<div class="attention">
<p class="first admonition-title">Attention!</p>
<p class="last">If you have installed gitweb files in a different directory, you
will have to update this file to match the install location.</p>
</div>
<p>Once again, we are using settings stored in <tt class="docutils literal">.htaccess</tt> file and
passing them to a script using environment variables set by Apache. In
this case, we are informing the wrapper script where our repositories
are with <tt class="docutils literal">HTTP_GIT_PROJECT_ROOT</tt>, and informing it where GitWeb
configuration file is with <tt class="docutils literal">HTTP_GITWEB_CONFIG</tt>. The wrapper script,
in turn, will forward these informations to both GitWeb and to its
config file.</p>
<p>Now, let's create GitWeb configuration file. Just
copy <tt class="docutils literal">gitweb_config.perl</tt> provided with this guide to
<tt class="docutils literal"><span class="pre">${GIT_REPOS_ROOT}/gitweb_config.perl</span></tt> or create an empty file in
that path location with the following contents:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># where is the git binary?</span>
<span style="color: #007800;">$GIT</span> = <span style="color: #ff0000;">&quot;/usr/bin/git&quot;</span>;
<span style="color: #666666; font-style: italic;"># where are our git project repositories?</span>
<span style="color: #007800;">$projectroot</span> = <span style="color: #007800;">$ENV</span><span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #ff0000;">'GIT_PROJECT_ROOT'</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>;
<span style="color: #666666; font-style: italic;"># what do we call our projects in the gitweb UI?</span>
<span style="color: #007800;">$home_link_str</span> = <span style="color: #ff0000;">&quot;My Git Projects&quot;</span>;
<span style="color: #666666; font-style: italic;">#  where are the files we need for gitweb to display?</span>
<span style="color: #000000; font-weight: bold;">@</span>stylesheets = <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">&quot;gitweb.css&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>;
<span style="color: #007800;">$logo</span> = <span style="color: #ff0000;">&quot;git-logo.png&quot;</span>;
<span style="color: #007800;">$favicon</span> = <span style="color: #ff0000;">&quot;/favicon.png&quot;</span>;
<span style="color: #666666; font-style: italic;"># what do we call this site?</span>
<span style="color: #007800;">$site_name</span> = <span style="color: #ff0000;">&quot;My Personal Git Repositories&quot;</span>;</pre></div></div>



<p>You can customize it a little bit, if you want, but the most important
setting, <tt class="docutils literal">$projectroot</tt>, is set to match the value of
<tt class="docutils literal">HTTP_GIT_PROJECT_ROOT</tt>, a env. var. set by Apache.</p>
<p>Notice that this file, <tt class="docutils literal">gitweb_config.perl</tt> is stored in the same
directory where your repositories are, in <tt class="docutils literal">${GIT_REPOS_ROOT}</tt>. If,
for some reason, you prefer to store it elsewhere, you will have to
update this information in the <tt class="docutils literal">.htaccess</tt> file.</p>
</div>
</div>
</div>
<div class="section" id="troubleshooting">
<h4><a class="toc-backref" href="#id24">2.5&nbsp;&nbsp;&nbsp;Troubleshooting</a></h4>
<p>So, something is not working as expected?</p>
<div class="section" id="disable-authentication">
<h5><a class="toc-backref" href="#id25">2.5.1&nbsp;&nbsp;&nbsp;Disable authentication</a></h5>
<p>Comment out the authentication code. This will ease your "debugging"
process.</p>
<p>Remember to uncomment it latter.</p>
</div>
<div class="section" id="use-info-cgi-script-to-check-cgi-script-s-environment">
<h5><a class="toc-backref" href="#id26">2.5.2&nbsp;&nbsp;&nbsp;Use info.cgi script to check CGI script's environment</a></h5>
<p>A nice way to check if there is something really wrong with your setup
is to use the <tt class="docutils literal">info.cgi</tt>, whose code is presented bellow. This
script is only a minor modification to the one presented in <a class="reference external" href="http://wiki.dreamhost.com/CGI">Dreamhost
wiki page on CGI</a> and allows your to do verify if you are able to
execute CGI scrips and what settings Apache is passing to the other
CGI scripts we use here.</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># disable filename globbing</span>
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">-f</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Content-type: text/plain; charset=iso-8859-1&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> CGI<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.0</span> <span style="color: #7a0874; font-weight: bold;">test</span> script report:
<span style="color: #7a0874; font-weight: bold;">echo</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> argc is <span style="color: #007800;">$#</span>. argv is <span style="color: #ff0000;">&quot;$*&quot;</span>.
<span style="color: #7a0874; font-weight: bold;">echo</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> SERVER_SOFTWARE = <span style="color: #007800;">$SERVER_SOFTWARE</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> SERVER_NAME = <span style="color: #007800;">$SERVER_NAME</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> GATEWAY_INTERFACE = <span style="color: #007800;">$GATEWAY_INTERFACE</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> SERVER_PROTOCOL = <span style="color: #007800;">$SERVER_PROTOCOL</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> SERVER_PORT = <span style="color: #007800;">$SERVER_PORT</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> REQUEST_METHOD = <span style="color: #007800;">$REQUEST_METHOD</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> HTTP_ACCEPT = <span style="color: #ff0000;">&quot;<span style="color: #007800;">$HTTP_ACCEPT</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> PATH_INFO = <span style="color: #ff0000;">&quot;<span style="color: #007800;">$PATH_INFO</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> PATH_TRANSLATED = <span style="color: #ff0000;">&quot;<span style="color: #007800;">$PATH_TRANSLATED</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> SCRIPT_NAME = <span style="color: #ff0000;">&quot;<span style="color: #007800;">$SCRIPT_NAME</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> QUERY_STRING = <span style="color: #ff0000;">&quot;<span style="color: #007800;">$QUERY_STRING</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> REMOTE_HOST = <span style="color: #007800;">$REMOTE_HOST</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> REMOTE_ADDR = <span style="color: #007800;">$REMOTE_ADDR</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> REMOTE_USER = <span style="color: #007800;">$REMOTE_USER</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> AUTH_TYPE = <span style="color: #007800;">$AUTH_TYPE</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> CONTENT_TYPE = <span style="color: #007800;">$CONTENT_TYPE</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> CONTENT_LENGTH = <span style="color: #007800;">$CONTENT_LENGTH</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> HTTP_GIT_PROJECT_ROOT = <span style="color: #007800;">$HTTP_GIT_PROJECT_ROOT</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> HTTP_GITWEB_CONFIG = <span style="color: #007800;">$HTTP_GITWEB_CONFIG</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></div></div>



<p>Copy it to <tt class="docutils literal">GIT_WEB_DIR</tt>, turn it into an executable script
(<tt class="docutils literal">chmod 755 ...</tt>) and point your browser to it ( That would be
<tt class="docutils literal"><span class="pre">http://www.example.tld/corporate-git/</span></tt> in our example).</p>
</div>
<div class="section" id="check-the-server-logs">
<h5><a class="toc-backref" href="#id27">2.5.3&nbsp;&nbsp;&nbsp;Check the server logs</a></h5>
<p>We are listing this as a last step but that's probably the fist place
where you should have looked for clues: your server logs.</p>
<p>For example:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>Mon Oct <span style="color: #000000;">25</span> <span style="color: #000000;">18</span>:<span style="color: #000000;">30</span>:<span style="color: #000000;">28</span> <span style="color: #000000;">2010</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>error<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>client 150.164.3.192<span style="color: #7a0874; font-weight: bold;">&#93;</span> Service not enabled: <span style="color: #ff0000;">'receive-pack'</span></pre></div></div>



<p>This message says that 'receive-pack' was not enable -- probably
because you are trying to push to a repository and authentication was
disabled. As we explained in <a class="reference internal" href="#setup-git-http-backend-for-your-repositories">Setup git-http-backend for your
repositories</a>, you <strong>must</strong> use authentication to be able to write
(<em>push</em>) to repositories using git-http-backend.</p>
<p>This one should be pretty obvious:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Digest: user username: password mismatch: <span style="color: #000000; font-weight: bold;">/</span>corporate-git<span style="color: #000000; font-weight: bold;">/</span>test.git<span style="color: #000000; font-weight: bold;">/</span>info<span style="color: #000000; font-weight: bold;">/</span>refs</pre></div></div>



<p>And so on...</p>
</div>
</div>
</div>
<div class="section" id="usage">
<h3><a class="toc-backref" href="#id28">3&nbsp;&nbsp;&nbsp;Usage</a></h3>
<p>So everything is ready to use. How do you actually create and use
these new repositories?</p>
<div class="section" id="creating-new-bare-repositories">
<h4><a class="toc-backref" href="#id29">3.1&nbsp;&nbsp;&nbsp;Creating new bare repositories</a></h4>
<p>In order to create a new repository, say <tt class="docutils literal">toyproject.git</tt>, all you
have to do is ssh into your Dreamhost account and:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>newgit.sh <span style="color: #660033;">-r</span> <span style="color: #800000;">${GIT_REPOS_ROOT}</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;My first private repository&quot;</span> <span style="color: #660033;">-n</span> toyproject</pre></div></div>



<p>That's it: your created and empty repository in you repository
collection. You can <em>clone</em> it if you want.</p>
</div>
<div class="section" id="cloning-an-empty-repository">
<h4><a class="toc-backref" href="#id30">3.2&nbsp;&nbsp;&nbsp;Cloning an empty repository</a></h4>
<p>So, you got a new pristine and empty repository. Let's <em>clone</em> it, shall we?:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">git</span> clone http:<span style="color: #000000; font-weight: bold;">//</span>username<span style="color: #000000; font-weight: bold;">@</span>www.example.tld<span style="color: #000000; font-weight: bold;">/</span>corporate-git<span style="color: #000000; font-weight: bold;">/</span>toyproject.git
Initialized empty Git repository <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>teste<span style="color: #000000; font-weight: bold;">/</span>.git<span style="color: #000000; font-weight: bold;">/</span>
Password:
warning: You appear to have cloned an empty repository.</pre></div></div>



<div class="important">
<p class="first admonition-title">Important</p>
<p>Have you noticed that we have a <tt class="docutils literal">username@</tt> in the URL? This
tells git that it must athenticate to the server before trying to
access the git repository.</p>
<p class="last">In this example, we are acessing the
repository with the crentials of the user <tt class="docutils literal">username</tt>, the one we
setup in <a class="reference internal" href="#password-protect-your-repository">Password-protect your repository</a>. Modify it to match
the user you created in that step.</p>
</div>
<p>But what if you already have a local repository and all you want is
push it and its history to the server?</p>
</div>
<div class="section" id="pushing-to-a-new-empty-repository">
<h4><a class="toc-backref" href="#id31">3.3&nbsp;&nbsp;&nbsp;Pushing to a new empty repository</a></h4>
<p>What you usually do is creating a local repository, adding file to it and committing this repository history to the new, empty and pristine repository in your web server:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> toyproject
<span style="color: #7a0874; font-weight: bold;">cd</span> toyproject
<span style="color: #c20cb9; font-weight: bold;">git</span> init
<span style="color: #c20cb9; font-weight: bold;">touch</span> README
<span style="color: #c20cb9; font-weight: bold;">git</span> add README
<span style="color: #c20cb9; font-weight: bold;">git</span> commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">'first commit'</span>
<span style="color: #c20cb9; font-weight: bold;">git</span> remote add origin http:<span style="color: #000000; font-weight: bold;">//</span>username<span style="color: #000000; font-weight: bold;">@</span>www.example.tld<span style="color: #000000; font-weight: bold;">/</span>corporate-git<span style="color: #000000; font-weight: bold;">/</span>toyproject.git
<span style="color: #c20cb9; font-weight: bold;">git</span> push origin master</pre></div></div>



<p>If you have an existing Git Repo, that's the procedure:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> existing_toyproject_git_repo
<span style="color: #c20cb9; font-weight: bold;">git</span> remote add origin http:<span style="color: #000000; font-weight: bold;">//</span>username<span style="color: #000000; font-weight: bold;">@</span>www.example.tld<span style="color: #000000; font-weight: bold;">/</span>corporate-git<span style="color: #000000; font-weight: bold;">/</span>toyproject.git
<span style="color: #c20cb9; font-weight: bold;">git</span> push origin master</pre></div></div>



<p>The above workflow follows what is presented in <a class="reference external" href="http://help.github.com/creating-a-repo/">http://help.github.com/creating-a-repo/</a>.</p>
</div>
</div>
<div class="section" id="final-remarks">
<h3><a class="toc-backref" href="#id32">4&nbsp;&nbsp;&nbsp;Final remarks</a></h3>
<p>If you need more than one collection of private repositories (say, one
for you and one to share privately with a group of coworkers), all you
need to do is:</p>
<blockquote>
<ol class="arabic simple">
<li>Create a directory for each of these collections.</li>
<li>Create copies of <tt class="docutils literal">newgit.sh</tt>, one for each collection, and setup
the value of GIT_REPOS_ROOT in each of them.</li>
<li>Adapt each .htaccess accordingly.</li>
<li>GitWeb: copy its files too.. Or just sym-link it from a pristine copy.</li>
</ol>
</blockquote>
</div>
<div class="section" id="todos">
<h3><a class="toc-backref" href="#id33">5&nbsp;&nbsp;&nbsp;TODOs</a></h3>
<ul class="simple">
<li>Focus on reusability.</li>
<li>Write the <a class="reference internal" href="#final-remarks">Final remarks</a> section properly.</li>
</ul>
<p><a class="reference external" href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond">http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond</a> --
serve directly w/ apache if...</p>
<p>Adding project .description directly in the scripts</p>
</div>
<div class="section" id="references">
<h3><a class="toc-backref" href="#id34">6&nbsp;&nbsp;&nbsp;References</a></h3>
<ul class="simple">
<li>arvinderkang.com - <a class="reference external" href="http://arvinderkang.com/2010/08/25/hosting-git-repositories-on-dreamhost/">Hosting Git repositories on Dreamhost</a></li>
<li>craigjolicoeur.com - <a class="reference external" href="http://craigjolicoeur.com/blog/hosting-git-repositories-on-dreamhost">Hosting Git Repositories on Dreamhost</a></li>
<li><a class="reference external" href="http://railstips.org/blog/archives/2008/11/23/gitn-your-shared-host-on/">Git'n Your Shared Host On</a></li>
<li><a class="reference external" href="http://faves.eapen.in/guide-to-hosting-git-repositories-on-dreamhos">http://faves.eapen.in/guide-to-hosting-git-repositories-on-dreamhos</a></li>
<li><a class="reference external" href="http://gist.github.com/73622">http://gist.github.com/73622</a></li>
<li><a class="reference external" href="http://wiki.dreamhost.com/Git#Smart_HTTP">http://wiki.dreamhost.com/Git#Smart_HTTP</a></li>
<li><a class="reference external" href="http://arvinderkang.com/2010/08/25/hosting-git-repositories-on-dreamhost/">http://arvinderkang.com/2010/08/25/hosting-git-repositories-on-dreamhost/</a></li>
<li><a class="reference external" href="http://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html">git-http-backend</a> manpage</li>
<li><a class="reference external" href="http://progit.org/2010/03/04/smart-http.html">Pro Git - Smart HTTP Transport</a></li>
<li><a class="reference external" href="http://www.jedi.be/blog/2009/05/06/8-ways-to-share-your-git-repository/">http://www.jedi.be/blog/2009/05/06/8-ways-to-share-your-git-repository/</a></li>
<li><a class="reference external" href="http://help.github.com/creating-a-repo/">http://help.github.com/creating-a-repo/</a></li>
</ul>
<!-- .. target-notes:: -->
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.burocrata.org/blog/archives/2010/11/08/345/private-git-repositories-on-dreamhost/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Copiando tudo de uma partição WBFS pra outra</title>
		<link>http://www.burocrata.org/blog/archives/2010/10/25/353/copiando-tudo-de-uma-particao-wbfs-pra-outra/</link>
		<comments>http://www.burocrata.org/blog/archives/2010/10/25/353/copiando-tudo-de-uma-particao-wbfs-pra-outra/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 23:00:47 +0000</pubDate>
		<dc:creator>MaCa</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Nerdocracia]]></category>
		<category><![CDATA[homebrew]]></category>
		<category><![CDATA[wii]]></category>

		<guid isPermaLink="false">http://www.burocrata.org/blog/?p=353</guid>
		<description><![CDATA[Usando o WIT, Wiims ISO Tools, copiar todas as ISOs de uma partição WBFS para outra é um comando simples como: ./wwt  --update --progress --part  /dev/rdisk1s1 ADD /dev/rdisk2s1 Primeira partição (/dev/rdisk1s1) é a partição WBFS de destino, a segunda a partição (/dev/rdisk2s1) WBFS onde os jogos se encontram. Homebrews ou jogos já existentes não são sobrescritos, [...]]]></description>
			<content:encoded><![CDATA[<p>Usando o <a href="http://wit.wiimm.de/">WIT, Wiims ISO Tools</a>, copiar todas as ISOs de uma partição WBFS para outra é um comando simples como:</p>
<pre>./wwt  --update --progress --part  /dev/rdisk1s1 ADD /dev/rdisk2s1</pre>
<p>Primeira partição (<code>/dev/rdisk1s1</code>) é a partição WBFS de destino, a segunda a partição (<code>/dev/rdisk2s1</code>) WBFS onde os jogos se encontram.</p>
<p><em>Homebrews</em> ou jogos já existentes não são sobrescritos, ou seja: ele só copia o que você ainda não possui.</p>
<p>Para descobrir qual partição tem seus jogos, conecte apenas o seu HD e rode o <code>wwt</code> com aopção <code>LIST-M</code>:</p>
<pre>
./wwt LM
ScanDevForPartitions(sd)
- part found: /dev/sdt
ScanDevForPartitions(rdisk)
- part found: /dev/rdisk0
- part found: /dev/rdisk0s2
- part found: /dev/rdisk0s1
- part found: /dev/rdisk1
- part found: /dev/rdisk1s0
- part found: /dev/rdisk1s0s1
- part found: /dev/rdisk1s0s2
- part found: /dev/rdisk2
- part found: /dev/rdisk2s1
- part found: /dev/rdisk2s2
- part found: /dev/rdisk2s3
WI  WBFS file
-------------------
1  /dev/rdisk2s1
-------------------
ID6     MiB Reg.  WI  40 discs (105 GiB)
--------------------------------------------------------------------
&lt;lista de jogos homebrew aqui...&gt;
--------------------------------------------------------------------
Total: 40 discs, 107092 MiB ~ 105 GiB used, 36432 MiB ~ 36 GiB free.
</pre>
<p>Pronto.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.burocrata.org/blog/archives/2010/10/25/353/copiando-tudo-de-uma-particao-wbfs-pra-outra/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Exporting a git repository to subversion</title>
		<link>http://www.burocrata.org/blog/archives/2009/10/06/309/exporting-a-git-repository-to-subversion/</link>
		<comments>http://www.burocrata.org/blog/archives/2009/10/06/309/exporting-a-git-repository-to-subversion/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 20:50:39 +0000</pubDate>
		<dc:creator>MaCa</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Nerdocracia]]></category>

		<guid isPermaLink="false">http://www.burocrata.org/blog/?p=309</guid>
		<description><![CDATA[Yeah, you read that right. That is probably the inverse of what most people want. But, anyway, let&#8217;s say you have a project originally hosted on a git repository and you need to export it to a subversion repository for some reason. Now what? The nice folks of Google Code have put a really good [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah, you read that right. That is probably the inverse of what most people want. But, anyway, let&#8217;s say you have a project originally hosted on a git repository and you need to export it to a subversion repository for some reason.  Now what?</p>
<p>The nice folks of <a href="http://code.google.com">Google Code</a> have put a really good <a href="http://code.google.com/p/support/wiki/ImportingFromGit">step-by-step guide explaining how to do it</a>. This guide was <a href="http://google-opensource.blogspot.com/2008/05/export-git-project-to-google-code.html">originally posted on Google Open Source Blog</a>. In case you need another view on the process, you can follow the <a href="http://n2.nabble.com/git-export-to-svn-td1376454.html">&#8220;git export to svn&#8221;</a> discussion on nabble &#8212; which just get good at the very end.</p>
<p>There is a little gotcha on the guide &#8212; not an error, but something they should have stressed. The Subversion repository you will use must be non-empty. Again: <strong>the Subversion repository must be non-empty</strong>.  Notice that by non-empty all they mean is that the subversion repository should have at least one revision <em>commited</em> to it, and not that it ought to have files in it. Got it? Good. Now move on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.burocrata.org/blog/archives/2009/10/06/309/exporting-a-git-repository-to-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reparo no Time Machine</title>
		<link>http://www.burocrata.org/blog/archives/2009/10/02/279/reparo-no-time-machine/</link>
		<comments>http://www.burocrata.org/blog/archives/2009/10/02/279/reparo-no-time-machine/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 03:35:47 +0000</pubDate>
		<dc:creator>MaCa</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[T.C.P.C.E.P.]]></category>

		<guid isPermaLink="false">http://www.burocrata.org/blog/?p=279</guid>
		<description><![CDATA[Então, como eu falei antes, enviei o meu Macbook para o reparo, onde trocaram a placa lógica dele. Depois disso o Time Machine parou de reconhecer o disco de backup antigo que eu usava. Na verdade, ele passa a ignorar todos os backups anteriores e resolve criar um backup novo, do zero. Desnecessário dizer que [...]]]></description>
			<content:encoded><![CDATA[<p>Então, como eu falei antes, <a href="http://www.burocrata.org/blog/archives/2009/09/28/270/reparo-no-mac/">enviei o meu Macbook para o reparo, onde trocaram a placa lógica dele. Depois disso o Time Machine parou de reconhecer o disco de backup antigo que eu usava</a>. Na verdade, ele passa a ignorar todos os backups anteriores e resolve criar um backup novo, do zero. Desnecessário dizer que isso tira metade da graça em usar o Time Machine (backups temporais), sem comentar os desperdício em espaço em disco &#8212; vou praticamente ter duas cópias dos mesmos dados do disco de backup.</p>
<blockquote><p>E aí, Bial, como fazer para resolver isso?</p></blockquote>
<p>Existem bons guias em inglês dizendo como resolver; coloquei links para eles ao final desse post. Mas, para aqueles que têm algum problema com o inglês, vamos ao passo-a-passo de como resolver isso na velha língua de Camões. Como alguns comandos requerem o uso da linha de comando, vou assumir certa familiaridade com a mesma.</p>
<h3>Entendendo o Problema</h3>
<p>Antes de mais nada, uma rápida explicação. O Time Machine usa um identificador que fica atrelado à sua placa de rede (o seu &#8220;<a href="http://pt.wikipedia.org/wiki/Endereço_MAC">endereço MAC</a>&#8220;) para reconhecer o backup de um micro. Isso permite inclusive que um mesmo disco de backup seja compartilhado por vários micros: cada um terá seu backup identificado unicamente pelo endereço MAC do seu respectivo micro.</p>
<p>Todavia, se a placa lógica de um micro muda, o endereço MAC dela também muda. Por isso, quando o Time Machine for procurar por backups anteriores do seu micro, ele procurará backups associados ao identificar atual do micro &#8212; ou seja, ao seu novo endereço MAC. E é por isso que ele não encontrará seus backups anteriores: todos os seus backups ainda estão atrelados ao antigo identificador do seu micro e não ao novo. Para corrigir esse problema temos que &#8220;informar&#8221; o Time Machine sobre essa mudança de identificador. Na prática, apenas atualizaremos o endereço MAC nos backups antigos com o novo endereço MAC. Assim, o Time Machine identificará seus backups anteriores como backups do micro atual e nada do seu histórico será perdido.</p>
<h3>Coletando algumas informações</h3>
<p>Antes de prosseguir, você terá de cololetar algumas informações</p>
<ul>
<li><strong><em>Mount-point</em> do Time Machine</strong><br />Provavelmente será dentro do <code>/Volumes</code>, alguma coisa como <code>'/Volumes/Time Machine'</code> ou, no meu caso, <code>'/Volumes/Backups do Time Machine/'</code>.</li>
<li><strong>Diretório onde o Time Machine guarda os backups antigos do seu micro</strong><br />Dentro do volume/mount-point do Time Machine haverá uma pasta chamada <code>Backups.backupdb</code> e, dentro dessa pasta, haverá uma (provavelmente) com o nome do seu micro. Essa é a pasta que contém os seus backups antigos. No meu caso, o path completo para ele era <code>/Volumes/Backups do Time Machine/Backups.backupdb/notebook</code></li>
<li><strong>O antigo endereço MAC do seu micro</strong><br />Sim! Você vai precisar dessa informação. Se você não tinha anotado o seu antigo endereço MAC em algum lugar o que lhe resta é extrair essa informação direto do Time Machine. O comando abaixo deve resolver esse problema. Adapte as nomes dos diretórios de acordo com as suas configurações<br />
<code><br />
$ cd /Volumes/Backups\ do\ Time\ Machine/Backups.backupdb/<br />
$ xattr -p com.apple.backupd.BackupMachineAddress notebook<br />
</code><br />
A saída desse comando deve ser algo como <code>00:1e:c2:1e:1e:ca</code>. Esse é o valor do seu antigo endereço MAC.
</li>
<li><strong>O novo endereço MAC do seu micro</strong><br />O comando abaixo deve dar conta de lhe fornecer essa informação<br />
<code><br />
$ LC_ALL=C ifconfig en0 | awk '/ether/{print $2}'<br />
</code><br />
O resultado deve ser um identificador como <code>00:22:41:22:16:f3</code>. Esse é o endereço MAC atual do seu micro.
</li>
</ul>
<h3>Passo-a-Passo</h3>
<p>De posse de todas as informações necessárias, vamos agora ao passo-a-passo para resolver esse problema.</p>
<ol>
<li>Se o disco de backup estiver conectado, desconecte-o.</li>
<li>Em seguida, desligue o Time Machine. Você não vai querer ele interagindo com você enquanto os ajustes são feitos. Vá lá no &#8220;Preferências do Sistema&#8221;, vá na área do Time Machine e desligue-o.</li>
<li>Reconecte seu disco de backup.</li>
<li>Desabilite temporariamente as ACLs no volume da Time Machine. Não precisa ficar com cara de Amélia se você não entendeu. Apenas digite os comandos abaixo:<br />
<code><br />
$ sudo fsaclctl -p '/Volumes/Backups do Time Machine/' -d<br />
</code>
</li>
<li>Dentro do raiz do volume do Time Machine existe um arquivo invisível cujo nome corresponde ao identificador MAC antigo do seu micro precedido por ponto e sem os &#8220;:&#8221;, ou seja &#8220;<code>.001ec21e1eca</code>&#8220;. Esse arquivo terá de ser renomeado para refletir o valor do novo MAC. Aplique o mesmo processo ao novo MAC e você terá o novo nome  para esse arquivo.<br />
<code><br />
$ cd /Volumes/Backups do Time Machine/<br />
$ mv .001ec21e1eca .0022412216f3<br />
</code>
</li>
<li>O diretório com seus backups antigos possui um <a href="http://en.wikipedia.org/wiki/Extended_file_attributes">atributo extendido</a> com o valor do MAC antigo. Atualize-o com o valor do MAC novo.<br />
<code><br />
$ cd /Volumes/Backups do Time Machine/<br />
$ sudo xattr -w com.apple.backupd.BackupMachineAddress 00:22:41:22:16:f3 Backups.backupdb/notebook<br />
</code></li>
<li>Reabilite as ACLs no volume da Time Machine.<br />
<code><br />
$ sudo fsaclctl -p '/Volumes/Backups do Time Machine/' -e<br />
</code>
</li>
<li>Desconecte/Ejete o seu disco de backup</li>
<li>Re-habilite o Time Machine</li>
<li>Reconecte o seu disco de backup</li>
</ol>
<p>E é isso. Após tudo isso o Time Machine deverá iniciar um outro processo de backup &#8212; e esse deve demorar um pouco mais já que provavelmente seu micro estava há um bom tempo sem fazer backup.</p>
<h3>Referências</h3>
<ul>
<li><a href="http://www.macosxhints.com/article.php?story=20080128003716101">macosxhints.com:  10.5: Repair Time Machine after logic board changes</a></li>
<li><a href="http://www.macosxhints.com/article.php?story=20081216145458979">macosxhints.com: 10.5: A script to fix Time Machine after hardware repairs </a></li>
<li><a href="http://www.tombridge.com/rta/2008/01/after-the-apple.html">Adventures in troubleshooting: After The Apple Repair: Fixing Time Machine</a></li>
<li><a href="http://www.tuaw.com/2009/07/20/mac-301-time-machine-backups-after-your-macs-brain-surgery/">Mac 301: Time Machine backups after your Mac&#8217;s brain surgery</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.burocrata.org/blog/archives/2009/10/02/279/reparo-no-time-machine/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Reparo no Macbook Pro</title>
		<link>http://www.burocrata.org/blog/archives/2009/09/28/270/reparo-no-mac/</link>
		<comments>http://www.burocrata.org/blog/archives/2009/09/28/270/reparo-no-mac/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 15:23:23 +0000</pubDate>
		<dc:creator>MaCa</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Nerdocracia]]></category>
		<category><![CDATA[T.C.P.C.E.P.]]></category>

		<guid isPermaLink="false">http://www.burocrata.org/blog/?p=270</guid>
		<description><![CDATA[Meu Macbook Pro estava com um problema estranho: desligava espontaneamente quando passava um tempo apenas na bateria, mesmo essa tendo carga. Bastava um &#8220;while true; do echo 1 > /dev/null; done&#8221; rodando em dois terminais para, em questão de minutos, o mac apagar. Mas apagar mesmo, de não voltar até que fosse ligado no cabo [...]]]></description>
			<content:encoded><![CDATA[<p>Meu Macbook Pro estava com um problema estranho: <a href="http://www.macbookrandomshutdown.com/">desligava espontaneamente</a> quando passava um tempo apenas na bateria, mesmo essa tendo carga. Bastava um &#8220;<code>while true; do echo 1 > /dev/null; done</code>&#8221; rodando em dois terminais para, em questão de minutos, o mac apagar. Mas apagar <strong>mesmo</strong>, de não voltar até que fosse ligado no cabo de força. E repetindo: a bateria ainda tinha (muita) carga.</p>
<p>Depois de muito adiar levei ele na assistência para ver se resolvia o problema. Antes de mais nada, tenho que dizer três coisas:
<ol>
<li>Primeiro, Deus salve o momento em que fiz meu plano AppleCare &#8212; valeu cada centavo!</li>
<li>Pela primeira vez na vida não me senti enganado por uma assistência técnica. Gostei muito do serviço lá da <a href="http://www.tecmania.com.br/">TecMania</a>, aqui em Belo Horizonte mesmo. Recomendo mesmo. <img src='http://www.burocrata.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </li>
<li>Finalmente, <a href="http://www.burocrata.org/blog/archives/2009/10/02/279/reparo-no-time-machine/">PQP!, Time Machine!</a></li>
</ol>
<p>O que ocorreu foi que depois de descartarem que o problema fosse a bateria, que parecia estar normal nos testes, resolveram trocar a placa lógica (<em lang="en">logic board</em>) do coitado. Trocaram e o problema persistiu. Pegaram uma bateria zerada que havia chegado a pouco por lá e tentaram reproduzir o problema. Como não conseguiram, deduziram que foi a bateria, e que a minha estava claramente defeituosa. Menos mal, fiquei com uma bateria nova e uma placa lógica nova sem pagar nada. Digo, tudo pago pelo AppleCare.</p>
<p>Tudo foi bem rápido. Mais rápido do que o esperava e quase tão rápido quanto eu gostaria. Todavia, depois de ter a placa lógica trocada, o <acronym title="macbook pro">MBP</acronym> se comportou um pouco estranho:</p>
<ul>
<li>O iTunes disse que não podia mais tocar as músicas da  minha coleção porque não tinha permissão.</li>
<li>O Time Machine não reconhecia os backups antigos que eu tinha.</li>
<li>O VMWare Fusion passou a perguntar se eu tinha movido ou copiado minhas máquinas virtuais.</li>
</ul>
<p>O que ocorreu foi que com a mudança da placa lógica, muitos programas acharam que eu tinha mudado de micro, o que não foi  de fato o que ocorreu. No caso do iTunes foi só autorizar esse <em>&#8220;novo&#8221;</em> computador. O VMWare funcionou sem problemas depois que eu disse que &#8220;copiei&#8221; as máquinas virtuais. <a href="http://www.burocrata.org/blog/archives/2009/10/02/279/reparo-no-time-machine/">Com o Time Machine não foi bem assim&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.burocrata.org/blog/archives/2009/09/28/270/reparo-no-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Massacre virtual</title>
		<link>http://www.burocrata.org/blog/archives/2009/06/05/269/massacre-virtual/</link>
		<comments>http://www.burocrata.org/blog/archives/2009/06/05/269/massacre-virtual/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 20:00:46 +0000</pubDate>
		<dc:creator>MaCa</dc:creator>
				<category><![CDATA[Desculpas-Fu]]></category>
		<category><![CDATA[Nerdocracia]]></category>
		<category><![CDATA[procrastination]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[twiiter]]></category>

		<guid isPermaLink="false">http://www.burocrata.org/blog/archives/2009/06/05/269/massacre-virtual/</guid>
		<description><![CDATA[Tirar a poeira desse blog com as estatísticas do último massacre que eu cometi. Deixei de seguir 21 feeds RSS e de 2 twitters &#8212; um deles o do @buscadesconto, que mesmo útil, não tem a utilidade que eu esperava). Os feeds que eu deixei de seguir foram: Authors @ Google YouTube Videos GoogleDevelopers YouTube [...]]]></description>
			<content:encoded><![CDATA[<p>Tirar a poeira desse blog com as estatísticas do último massacre que eu cometi. Deixei de seguir 21  feeds <acronym title="Really Simple Syndication ">RSS</acronym> e de 2 twitters &#8212; um deles o do @buscadesconto, que mesmo útil, não tem a utilidade que eu esperava). Os feeds que eu deixei de seguir foram:</p>
<ul>
<li><a href="http://www.youtube.com/rss/user/AtGoogleTalks/videos.rss">Authors @ Google YouTube Videos</a></li>
<li><a href="http://www.youtube.com/rss/user/GoogleDevelopers/videos.rss">GoogleDevelopers YouTube Videos</a></li>
<li><a href="http://www.youtube.com/rss/user/googletechtalks/videos.rss">Googlet Tech Talks YouTube Videos</a></li>
<li><a href="http://www.bloglines.com/rss/about/news">Bloglines | News</a></li>
<li><a href="http://www.kuro5hin.org/backend.rdf">kuro5hin.org</a></li>
<li><a href="http://feeds.feedburner.com/macresearch">MacResearch &#8211; Online Community and Resource for Mac OS X in Science</a></li>
<li><a href="http://www.mozillazine.org/atom.xml">mozillaZine.org</a></li>
<li><a href="http://sourceforge.net/export/rss2_projnews.php?group_id=69426">SourceForge.net: SF.net Project News: Turck MMCache for PHP</a></li>
<li><a href="http://www.nongnu.org/straw/news.rss">Straw News</a></li>
<li><a href="http://www.tableless.com.br/makerss.asp">Tableless</a></li>
<li><a href="http://www.zite.org/blog/wp-rss2.php">Vida :: Life :: Vie</a></li>
<li><a href="http://feeds.feedburner.com/yuiblog/yui-theater">Yahoo! User Interface Blog » YUI Theater</a></li>
<li><a href="http://white.sakura.ne.jp/~piro/xul/xul.rdf.en">Update-Information of XUL Applications</a></li>
<li><a href="http://www.advogato.org/rss/articles.xml">Advogato</a></li>
<li><a href="http://alexsilva.blog.br/feed/">Alex</a></li>
<li><a href="http://groups.yahoo.com/group/decentralization/messages?rss=1&amp;amp;amp;amp;viscount=15">decentralization at Yahoo! Groups</a></li>
<li><a href="http://eutobemfisicamente.blogspot.com/atom.xml?bsuser=eutobemfisicamente">Eu tô bem fisicamente!</a></li>
<li><a href="http://gnomedesktop.org/backend2.php">FootNotes &#8211; GNOME Desktop News</a></li>
<li><a href="http://gaim.sourceforge.net/rss.php/news">Gaim news</a></li>
<li><a href="http://amistadetudo.blogspot.com/atom.xml">Amistad é tudo!</a></li>
<li><a href="http://www.evilmadscientist.com/backend/geeklog.rss">Evil Mad Scientist Laboratories</a></li>
</ul>
<p>É uma miscelânia de blogs de amigos que foram desativados, blogs de programas que eu não uso mais e de coisas que, apesar de interessante, simplesmente tomam tempo demais <img src='http://www.burocrata.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Os canais de video do google, por exemplo: tem muita coisa bacana, mas não tenho 1h para gastar vendo-os e cansei de me enganar que marcar para &#8220;ver depois&#8221; vai resolver já quem na prática, nunca vejo.</p>
<p>E é isso. Namastê, much love, peace out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.burocrata.org/blog/archives/2009/06/05/269/massacre-virtual/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DIY: Base para Lava Lamp</title>
		<link>http://www.burocrata.org/blog/archives/2009/02/07/266/diy-base-para-lava-lamp/</link>
		<comments>http://www.burocrata.org/blog/archives/2009/02/07/266/diy-base-para-lava-lamp/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 14:32:15 +0000</pubDate>
		<dc:creator>MaCa</dc:creator>
				<category><![CDATA[Nerdocracia]]></category>
		<category><![CDATA[diy  lava  lamp  base]]></category>

		<guid isPermaLink="false">http://www.burocrata.org/blog/archives/2009/02/07/266/diy-base-para-lava-lamp/</guid>
		<description><![CDATA[Na falta de coisa melhor para postar, vamos tirar a poeira disso com um &#8220;antigo&#8221; vídeo de minha autoria, sobre como fazer uma base (tosca) para uma Lava Lamp. Enquanto que uma garrafa de lava lamp custa uns R$ 25 no mercado, a base custa aprox. R$ 100. Isso é um absurdo, visto que a [...]]]></description>
			<content:encoded><![CDATA[<p>Na falta de coisa melhor para postar, vamos tirar a poeira disso com um &#8220;antigo&#8221; vídeo de minha autoria, sobre como fazer uma base (tosca) para uma Lava Lamp.</p>
<p>Enquanto que uma garrafa de lava lamp custa uns R$ 25 no mercado, a base custa aprox. R$ 100. Isso é um absurdo, visto que a base nao passa de um suporte para a garrafa e uma lâmpada de 40W. Sendo assim, resolvi fazer uma para mim usando uma lata de Nescau 2.0 &#8212; e funcionou <img src='http://www.burocrata.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Custo total inferior a R$ 30, incluíndo a garrafa de lava. A lampada que eu usei no final das contas foi uma dicróica de 50W.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/uw14ZXvOnMA&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/uw14ZXvOnMA&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>E sim, eu sabia o que estava fazendo quando eu usei a furadeira <img src='http://www.burocrata.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.burocrata.org/blog/archives/2009/02/07/266/diy-base-para-lava-lamp/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Handbrake novo</title>
		<link>http://www.burocrata.org/blog/archives/2008/11/27/265/handbrake-novo/</link>
		<comments>http://www.burocrata.org/blog/archives/2008/11/27/265/handbrake-novo/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 22:16:41 +0000</pubDate>
		<dc:creator>MaCa</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[psp]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.burocrata.org/blog/archives/2008/11/27/265/handbrake-novo/</guid>
		<description><![CDATA[Só para tirar a poeira do blog &#8212; e iniciar uma nova seção do mesmo. Saiu uma nova versão do Handbrake, um probrama para Mac (com versões para Linux e Windows) que converte seus DVDs para vários formatos interessantes, entre eles os formatos suportados pelos iPod (5G), iPhone, Apple TV, PSP e muitos outros. De [...]]]></description>
			<content:encoded><![CDATA[<p>Só para tirar a poeira do blog &#8212; e iniciar uma <a href="http://www.burocrata.org/blog/archives/category/apple/">nova seção</a> do mesmo. Saiu uma nova versão do <a href="http://handbrake.fr/">Handbrake</a>, um probrama para Mac (com versões para Linux e Windows) que converte seus DVDs para vários formatos interessantes, entre eles os formatos suportados pelos iPod (5G), iPhone, Apple TV, PSP e muitos outros. </p>
<p>De especial <a href="http://handbrake.fr/?article=9">a nova versão permite agora a conversão a partir de vídeos em qualquer formato</a>, não somente em DVD. Sim! Agora você aquele seu amigo pode converter os vídeos .AVI do Family Guy que ele baixou da internet para o iPhone ou para o PSP dele <img src='http://www.burocrata.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Bom lembrar que esse programa pode ser útil também para aqueles que querem diminuir o tamanho dos seus vídeos pois ele suporta a <em>codec</em> H.264, que consegue taxas de compressão muito boas &#8212; melhores do que as que se obtem com Divx e similares.</p>
<p>E é isso.</p>
<p>Via <a href="http://www.webmonkey.com/blog/Handbrake_Still_the_Best_DVD_Converter__Now_Handles_Any_Video_Format">Wired Blog: Handbrake Still the Best DVD Converter, Now Handles Any Video Format</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.burocrata.org/blog/archives/2008/11/27/265/handbrake-novo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vida nova a um velho PDA</title>
		<link>http://www.burocrata.org/blog/archives/2008/10/16/264/vida-nova-a-um-velho-pda/</link>
		<comments>http://www.burocrata.org/blog/archives/2008/10/16/264/vida-nova-a-um-velho-pda/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 18:23:52 +0000</pubDate>
		<dc:creator>MaCa</dc:creator>
				<category><![CDATA[Nerdocracia]]></category>

		<guid isPermaLink="false">http://www.burocrata.org/blog/archives/2008/10/16/264/vida-nova-a-um-velho-pda/</guid>
		<description><![CDATA[Bacana a proposta de dar vida nova a um velho PDF e transformá-lo em um capenga mas usável notebook ou em um eReader. MAKE @ Digital Nomads &#8211; Things to do and make with old Palm Pilots e Giving old PDAs a new life…]]></description>
			<content:encoded><![CDATA[<p>Bacana a proposta de dar vida nova a um velho PDF e transformá-lo em um capenga mas usável notebook ou em um eReader.</p>
<p><a href="http://blog.makezine.com/archive/2008/09/make_digital_nomads.html?CMP=OTC-0D6B48984890">MAKE @ Digital Nomads &#8211; Things to do and make with old Palm Pilots</a> e <a href="http://www.digitalnomads.com/2008/09/23/giving-old-pdas-a-new-life">Giving old PDAs a new life…</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.burocrata.org/blog/archives/2008/10/16/264/vida-nova-a-um-velho-pda/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In plain English (except the post)</title>
		<link>http://www.burocrata.org/blog/archives/2008/09/12/263/in-plain-english-except-the-post/</link>
		<comments>http://www.burocrata.org/blog/archives/2008/09/12/263/in-plain-english-except-the-post/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 21:52:03 +0000</pubDate>
		<dc:creator>MaCa</dc:creator>
				<category><![CDATA[Nerdocracia]]></category>
		<category><![CDATA[Vida no Clã]]></category>

		<guid isPermaLink="false">http://www.burocrata.org/blog/archives/2008/09/12/263/in-plain-english-except-the-post/</guid>
		<description><![CDATA[Como faz tempo que eu não escrevo aqui, eu provavelmente deveria voltar com alguma coisa grande, bacana, para marcar o início de uma nova era (que provavelmente será sucedida por outro intervalo sem &#8220;posts&#8221; por um bom tempo). Devia, mas não vou. Esse post é tão e simplesmente para apontar para um canal do YouTube [...]]]></description>
			<content:encoded><![CDATA[<p>Como faz tempo que eu não escrevo aqui, eu provavelmente deveria voltar com alguma coisa grande, bacana, para marcar o início de uma nova era (que provavelmente será sucedida por outro intervalo sem &#8220;posts&#8221; por um bom tempo). Devia, mas não vou.</p>
<p>Esse post é tão e simplesmente para apontar para um canal do YouTube que eu achei particularmente interessante: &#8220;<a href="http://www.youtube.com/user/leelefever">Explanations in Plain English</a>&#8220;. Não é um blog sobre inglês. Na verdade parece mais um &#8220;How Stuff works&#8221; animado &#8212; e em inglês <img src='http://www.burocrata.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . Os tópicos são bem interessantes: <a href="http://www.youtube.com/watch?v=ok_VQ8I7g6I">como as eleições nos <acronym title="Estados Unidos da América">EUA</acronym> funcionam</a>, <a href="http://www.youtube.com/watch?v=0klgLsSxGsU">o que é RSS, como funciona, para que serve e como você pode usá-lo</a> e por aí vai. Tem videos sobre <a href="http://www.youtube.com/watch?v=bVnfyradCPY">zumbis</a> (?!), <a href="http://www.youtube.com/watch?v=-dnL00TdmLY">wikis</a>, <a href="http://www.youtube.com/watch?v=ddO9idmax0o">twiiter</a>, <a href="http://www.youtube.com/watch?v=x66lV7GOcNU">social bookmarking</a> e mais. Todos distribuídos em uma licença Creative Commons.</p>
<p>A temática dos vídeos, como pode-se ver pela pequena lista acima, é mais voltada para tópicos relacionados à Internet. O mais bacanas dele é a forma com que abordam seus assuntos: sem tecnicalidades, de maneira direta, clara e acessível &#8212; do jeito que seus familiares gostam <img src='http://www.burocrata.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.burocrata.org/blog/archives/2008/09/12/263/in-plain-english-except-the-post/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

