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

<channel>
	<title>Fedora &#187; Git</title>
	<atom:link href="http://gofedora.com/archives/category/git/feed/" rel="self" type="application/rss+xml" />
	<link>http://gofedora.com</link>
	<description>How Tos, Tutorials, Tips and Tricks</description>
	<lastBuildDate>Thu, 25 Feb 2010 07:55:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How To: Install and Use Twython (Python Wrapper for Twitter API)</title>
		<link>http://gofedora.com/how-to-install-use-twython-python-wrapper-for-twitter-api/</link>
		<comments>http://gofedora.com/how-to-install-use-twython-python-wrapper-for-twitter-api/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 07:49:51 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Code Demo]]></category>
		<category><![CDATA[Proxy Support]]></category>
		<category><![CDATA[Twitter API]]></category>
		<category><![CDATA[Twython]]></category>

		<guid isPermaLink="false">http://gofedora.com/?p=826</guid>
		<description><![CDATA[
As promised in my previous post, here is a brief howto on getting started with twython. The main advantage of Twython over several other python (or any other language) wrappers for Twitter API is that it works even when you are behind your organizations proxy.
Download Twython
You can download latest version of twython from twython page [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> and <a href="http://cachevideos.com/">Videocache</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://gofedora.com/how-to-install-use-twython-python-wrapper-for-twitter-api/" class="post_image_link"  title="Permanent link to How To: Install and Use Twython (Python Wrapper for Twitter API)"><img class="post_image alignnone" src="http://gofedora.com/wp-content/uploads/2009/09/twython.jpg" width="320" height="220" alt="Twython (Twitter API in Python)" title="How To: Install and Use Twython (Python Wrapper for Twitter API)" /></a>
</p><p>As promised in my <a href="http://gofedora.com/love-twitter-love-python-love-twython/"  target="_blank">previous post</a>, here is a brief howto on getting started with twython. The main advantage of Twython over several other python (or any other language) wrappers for Twitter API is that it works even when you are behind your organizations proxy.</p>
<h3><span style="text-decoration: underline;"><strong>Download Twython</strong></span></h3>
<p>You can download latest version of twython from <a rel="nofollow" href="http://gofedora.com/goto/http://github.com/ryanmcgrath/twython/tree/master"  target="_blank">twython page on github</a>. You can either clone using git (if you have git installed) or can click the download button.</p>
<h3><span style="text-decoration: underline;"><strong>Install Twython</strong></span></h3>
<p>Once you are done with extracting the downloaded tar file. Change directory to twython and run these command as root.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>fedora ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ git clone git:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>ryanmcgrath<span style="color: #000000; font-weight: bold;">/</span>twython.git
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>fedora ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> twython<span style="color: #000000; font-weight: bold;">/</span>dist
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>fedora dist<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xvzf</span> twython-0.8.tar.gz
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>fedora dist<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> twython-<span style="color: #000000;">0.8</span><span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>fedora dist<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ python setup.py build
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>fedora dist<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span></pre></td></tr></table></div>

<h3><span style="text-decoration: underline;"><strong>Use Twython from Python Interpreter</strong></span></h3>
<p>Below is a direct copy paste lines from my interpreter. See how things are working (learning by doing).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: black;">&#91;</span>saini@bordeaux ~<span style="color: black;">&#93;</span>$ python
Python <span style="color: #ff4500;">2.6</span> <span style="color: black;">&#40;</span>r26:<span style="color: #ff4500;">66714</span>, Mar <span style="color: #ff4500;">17</span> <span style="color: #ff4500;">2009</span>, <span style="color: #ff4500;">11</span>:<span style="color: #ff4500;">44</span>:<span style="color: #ff4500;">21</span><span style="color: black;">&#41;</span> 
<span style="color: black;">&#91;</span>GCC 4.4.0 <span style="color: #ff4500;">20090313</span> <span style="color: black;">&#40;</span>Red Hat 4.4.0-<span style="color: #ff4500;">0.26</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span> on linux2
Type <span style="color: #483d8b;">&quot;help&quot;</span>, <span style="color: #483d8b;">&quot;copyright&quot;</span>, <span style="color: #483d8b;">&quot;credits&quot;</span> <span style="color: #ff7700;font-weight:bold;">or</span> <span style="color: #483d8b;">&quot;license&quot;</span> <span style="color: #ff7700;font-weight:bold;">for</span> more information.
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #808080; font-style: italic;"># first of all, import twython module</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #ff7700;font-weight:bold;">import</span> twython
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #808080; font-style: italic;"># Authenticate your twitter account with your twitter username</span>
... <span style="color: #808080; font-style: italic;"># and password with twitter.setup method.</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> client = twython.<span style="color: black;">setup</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Basic'</span>,<span style="color: #483d8b;">'myusername'</span>,<span style="color: #483d8b;">'mypassword'</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> client.<span style="color: black;">authenticated</span>
<span style="color: #008000;">True</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #808080; font-style: italic;">#Lets update our current status on twitter with some cool message.</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> client.<span style="color: black;">updateStatus</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Testing #twython. The coolest #TwitterAPI :)'</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #808080; font-style: italic;"># Now go and check your current status on twitter. Surprised!!!</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #808080; font-style: italic;"># Get your or anyone's followers</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> client.<span style="color: black;">getFollowersIDs</span><span style="color: black;">&#40;</span>screen_name=<span style="color: #483d8b;">'gofedora'</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #808080; font-style: italic;"># Output truncated.</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #808080; font-style: italic;"># Get help for any function.</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #ff7700;font-weight:bold;">print</span> client.<span style="color: black;">createFriendship</span>.__doc__
createFriendship<span style="color: black;">&#40;</span><span style="color: #008000;">id</span> = <span style="color: #008000;">None</span>, user_id = <span style="color: #008000;">None</span>, screen_name = <span style="color: #008000;">None</span>, follow = <span style="color: #483d8b;">&quot;false&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
	Allows the authenticating users to follow the <span style="color: #dc143c;">user</span> specified <span style="color: #ff7700;font-weight:bold;">in</span> the ID parameter.
	<span style="color: black;">Returns</span> the befriended <span style="color: #dc143c;">user</span> <span style="color: #ff7700;font-weight:bold;">in</span> the requested format when successful. <span style="color: black;">Returns</span> a
	<span style="color: #dc143c;">string</span> describing the failure condition when unsuccessful. <span style="color: black;">If</span> you are already
	friends <span style="color: #ff7700;font-weight:bold;">with</span> the <span style="color: #dc143c;">user</span> an HTTP <span style="color: #ff4500;">403</span> will be returned.
&nbsp;
	<span style="color: black;">Parameters</span>:
		<span style="color: #66cc66;">**</span> Note: One of the following <span style="color: #ff7700;font-weight:bold;">is</span> required. <span style="color: black;">&#40;</span><span style="color: #008000;">id</span>, user_id, screen_name<span style="color: black;">&#41;</span>
		<span style="color: #008000;">id</span> - Required. <span style="color: black;">The</span> ID <span style="color: #ff7700;font-weight:bold;">or</span> screen name of the <span style="color: #dc143c;">user</span> to befriend.
		<span style="color: black;">user_id</span> - Required. <span style="color: black;">Specfies</span> the ID of the <span style="color: #dc143c;">user</span> to befriend. <span style="color: black;">Helpful</span> <span style="color: #ff7700;font-weight:bold;">for</span> disambiguating when a valid <span style="color: #dc143c;">user</span> ID <span style="color: #ff7700;font-weight:bold;">is</span> also a valid screen name. 
		<span style="color: black;">screen_name</span> - Required. <span style="color: black;">Specfies</span> the screen name of the <span style="color: #dc143c;">user</span> to befriend. <span style="color: black;">Helpful</span> <span style="color: #ff7700;font-weight:bold;">for</span> disambiguating when a valid screen name <span style="color: #ff7700;font-weight:bold;">is</span> also a <span style="color: #dc143c;">user</span> ID. 
		<span style="color: black;">follow</span> - Optional. <span style="color: black;">Enable</span> notifications <span style="color: #ff7700;font-weight:bold;">for</span> the target <span style="color: #dc143c;">user</span> <span style="color: #ff7700;font-weight:bold;">in</span> addition to becoming friends. 
<span style="color: #66cc66;">&gt;&gt;&gt;</span></pre></td></tr></table></div>

<p>So now you are ready to do wonders with twython. Write your own code and blog/brag about it <img src='http://gofedora.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="How To: Install and Use Twython (Python Wrapper for Twitter API)" /><br />
<h3>Related Posts</h3>
<ul class="related_post">
<li><a href="http://gofedora.com/love-twitter-love-python-love-twython/"  title="I Love Twitter, I Love Python = I Love Twython">I Love Twitter, I Love Python = I Love Twython</a></li>
</ul>
<p><a href="http://gofedora.com/" >Fedora Tutorials</a> and <a href="http://cachevideos.com/" >Videocache</a> by <a href="http://saini.co.in/" >Kulbir Saini</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/how-to-install-use-twython-python-wrapper-for-twitter-api/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To: Install and Configure GitWeb</title>
		<link>http://gofedora.com/how-to-install-configure-gitweb/</link>
		<comments>http://gofedora.com/how-to-install-configure-gitweb/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 17:38:08 +0000</pubDate>
		<dc:creator>Kulbir Saini</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Tips - Tricks]]></category>
		<category><![CDATA[Clean URL]]></category>
		<category><![CDATA[Code Repository]]></category>
		<category><![CDATA[GitWeb]]></category>
		<category><![CDATA[Repository Browser]]></category>
		<category><![CDATA[Source Code Management]]></category>

		<guid isPermaLink="false">http://172.17.8.64/gofedora/?p=288</guid>
		<description><![CDATA[
Goal
Setting up gitweb (web interface for SCM software git) for your project&#8217;s git repository for public access and developer commits via ssh.
Assumptions

You already have your project&#8217;s git repository.
You have hosting space somewhere to host gitweb.
You have root access.
You are using Apache as webserver.

Example for this howto
Project : VideoCache
Domain for gitweb : git.cachevideos.com
URL for git access [...]<p><a href="http://gofedora.com/">Fedora Tutorials</a> and <a href="http://cachevideos.com/">Videocache</a> by <a href="http://saini.co.in/">Kulbir Saini</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://gofedora.com/how-to-install-configure-gitweb/" class="post_image_link"  title="Permanent link to How To: Install and Configure GitWeb"><img class="post_image alignnone" src="http://gofedora.com/wp-content/uploads/2009/01/Git-Gitweb-Repo.jpg" width="384" height="327" alt="Git Gitweb Repo" title="How To: Install and Configure GitWeb" /></a>
</p><h4><span style="text-decoration: underline;"><strong>Goal</strong></span></h4>
<p>Setting up gitweb (web interface for SCM software git) for your project&#8217;s git repository for public access and developer commits via ssh.</p>
<h4><span style="text-decoration: underline;"><strong>Assumptions</strong></span></h4>
<ol>
<li>You already have your project&#8217;s git repository.</li>
<li>You have hosting space somewhere to host gitweb.</li>
<li>You have root access.</li>
<li>You are using Apache as webserver.</li>
</ol>
<h4><span style="text-decoration: underline;"><strong>Example for this howto</strong></span></h4>
<p>Project : <a href="http://cachevideos.com"  target="_blank">VideoCache</a><br />
Domain for gitweb : <a rel="nofollow" href="http://gofedora.com/goto/http://git.cachevideos.com"  target="_blank">git.cachevideos.com</a><br />
URL for git access for videocache : <a rel="nofollow" href="http://gofedora.com/goto/http://git.cachevideos.com/videocache.git"  target="_blank">http://git.cachevideos.com/videocache.git</a><br />
Actual path on server : <em>/home/saini/domains/cachevideos.com/git</em><br />
Git repository : <em>/home/saini/projects/videocache/</em></p>
<h4><span style="text-decoration: underline;"><strong>Installation</strong></span></h4>
<p>Installation is pretty easy. Just one single command would do everything.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># yum install gitweb (do as root)</span></pre></div></div>

<p>This will create a directory <em>/var/www/git</em> which is default for gitweb.</p>
<p>Copy the directory <em>/var/www/git/</em> to <em>/home/saini/domains/cachevideos.com/git</em></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cp -r /var/www/git /home/saini/domains/cachevideos.com/git</span></pre></div></div>

<h4><span style="text-decoration: underline;"><strong>Configuration</strong></span></h4>
<p><span style="text-decoration: underline;"><strong>1. GitWeb</strong></span></p>
<p>Open the file <em>/etc/gitweb.conf</em> (it may or may not be there) and add the following lines to it.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Change This</span>
<span style="color: #0000ff;">$projectroot</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'/home/saini/domains/cachevideos.com/git'</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;"># Change This</span>
<span style="color: #0000ff;">$site_name</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;Kulbir Saini's git trees.&quot;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;"># Don't Change the variables below</span>
<span style="color: #0000ff;">$my_uri</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$home_link</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'/'</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">@stylesheets</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;/gitweb.css&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$favicon</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;/git-favicon.png&quot;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$logo</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;/git-logo.png&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p><span style="text-decoration: underline;"><strong>2. Apache</strong></span></p>
<p>Open the file <em>/etc/httpd/conf.d/git.conf</em> and clear all the lines that are already there and add the following lines to it</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">  DocumentRoot <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>saini<span style="color: #000000; font-weight: bold;">/</span>domains<span style="color: #000000; font-weight: bold;">/</span>cachevideos.com<span style="color: #000000; font-weight: bold;">/</span>git
  ServerName git.cachevideos.com
  ErrorLog <span style="color: #ff0000;">&quot;/home/saini/domains/cachevideos.com/logs/error_log&quot;</span>
  CustomLog <span style="color: #ff0000;">&quot;/home/saini/domains/cachevideos.com/logs/access_log&quot;</span> combined
  SetEnv  GITWEB_CONFIG  <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>gitweb.conf
  DirectoryIndex gitweb.cgi
&nbsp;
    Allow from all
    AllowOverride all
    Order allow,deny
    Options +ExecCGI
    AddHandler cgi-script .cgi
&nbsp;
      SetHandler cgi-script
&nbsp;
    RewriteEngine on
    RewriteRule ^<span style="color: #7a0874; font-weight: bold;">&#91;</span>a-zA-Z0-<span style="color: #000000;">9</span>_\-<span style="color: #7a0874; font-weight: bold;">&#93;</span>+\.git<span style="color: #000000; font-weight: bold;">/</span>?<span style="color: #7a0874; font-weight: bold;">&#40;</span>\?.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>?$ <span style="color: #000000; font-weight: bold;">/</span>gitweb.cgi<span style="color: #000000; font-weight: bold;">%</span><span style="color: #7a0874; font-weight: bold;">&#123;</span>REQUEST_URI<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>L,PT<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p><span style="text-decoration: underline;"><strong>3. Git repository configuration</strong></span></p>
<p>Go to your git repository (<em>/home/saini/projects/videocache/</em>) and make the following changes.</p>
<p><strong>(a).</strong> Open file <em>.git/description</em> and add a short nice description for your project.</p>
<p>videocache  is  a  squid  url  rewriter plugin written in Python to facilitate youtube, metacafe, dailymotion, google, vimeo, msn soapbox,   tvuol.uol.com.br, blip.tv, break.com videos and wrzuta.pl audio caching.</p>
<p><strong>(b).</strong> Open file <em>.git/config</em> and append the following lines</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>gitweb<span style="color: #7a0874; font-weight: bold;">&#93;</span>
  owner = <span style="color: #ff0000;">&quot;Kulbir Saini&quot;</span></pre></div></div>

<h3><span style="text-decoration: underline;"><strong>Copy project&#8217;s git repository for gitweb</strong></span></h3>
<p>Copy the <em>/home/saini/projects/videocache/.git</em> directory to <em>/home/saini/domains/cachevideos.com/git/videocache.git</em></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cp -r /home/saini/projects/videocache/.git /home/saini/domains/cachevideos.com/git/videocache.git</span></pre></div></div>

<h4><span style="text-decoration: underline;"><strong>Finishing Step</strong></span></h4>
<p>Restart Apache webserver.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># service httpd restart</span></pre></div></div>

<p>Now you can browser a list of your projects&#8217; git repositories at <a rel="nofollow" href="http://gofedora.com/goto/http://git.cachevideos.com/"  target="_blank">http://git.cachevideos.com/</a> .</p>
<h4><span style="text-decoration: underline;"><strong>Adding another project repository</strong></span></h4>
<p>Just copy the project repository&#8217;s .git directory to <em>/home/saini/domains/cachevideos.com/git/prjoect_name.git</em>. And it&#8217;ll be shown on the list.</p>
<h4><span style="text-decoration: underline;"><strong>Committing (pushing) to the repository</strong></span></h4>
<p>For committing to the repository via ssh use the following command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Pushing everything (Please see the username)</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost videocache<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># git push --all ssh://saini@git.cachevideos.com/~saini/domains/cachevideos.com/git/videocache.git</span></pre></div></div>

<p>To update tags on the remote repository use this command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Pushing all tags</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost videocache<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># git push --tags ssh://saini@git.cachevideos.com/~saini/domains/cachevideos.com/git/videocache.git</span></pre></div></div>

<p>Well, if you consider just the web interface and committing part for your project, thats all. But things can be fine tuned further. Below are few hacks!</p>
<p><span style="text-decoration: underline;"><strong>1. Enabling nice urls.</strong></span></p>
<p>By default the urls for browsing repository via git web are pretty crappy and difficult to remember. The <strong>RewriteRule</strong> and <strong>RewriteEngine</strong> lines in your Apache configuration file (<em>/etc/httpd/conf.d/git.conf</em>) takes care of that and produce nice and clean urls.</p>
<p>So you can browser the repository via <a rel="nofollow" href="http://gofedora.com/goto/http://git.cachevideos.com/videocache.git"  target="_blank">http://git.cachevideos.com/videocache.git</a> instead of <a rel="nofollow" href="http://gofedora.com/goto/http://git.cachevideos.com/?p=videocache.git;a=summary"  target="_blank">http://git.cachevideos.com/?p=videocache.git;a=summary</a>.</p>
<p><span style="text-decoration: underline;"><strong>2. Enabling remote ls (git-ls-remote or git ls-remote)</strong></span></p>
<p>This is the most trickiest part. If you try the command below, it won&#8217;t produce any output</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># git-ls-remote http://git.cachevideos.com/videocache.git</span></pre></div></div>

<p>You need to go to project&#8217;s repository in gitweb and then run the following command to update the server info for git.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd /home/saini/domains/cachevideos.com/git/videocache.git/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># git-update-server-info</span></pre></div></div>

<p>Try the ls-remote command now and it should succeed by producing all the branches and tags in the remote repository.</p>
<p>But there is a problem, you have to run the above command after every commit to the remote repository. To solve this issue, you can enable post-update hook for the project&#8217;s repository in gitweb. Use the following command to enable it.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># cd /home/saini/domains/cachevideos.com/git/videocache.git/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>localhost ~<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># chmod +x post-update</span></pre></div></div>

<p>The above command will update the server info automatically every time you commit.</p>
<p>Thats all you need to do for setting up gitweb. I hope this will be helpful.<br />
<h3>Recommended Posts</h3>
<ul class="related_post">
<li><a href="http://gofedora.com/how-to-install-ati-catalyst-fglrx-98-drivers-fedora-11/"  title="How To: Install ATI Catalyst (fglrx) Drivers">How To: Install ATI Catalyst (fglrx) Drivers</a></li>
<li><a href="http://gofedora.com/fedora-12-ati-catalyst-drivers/"  title="Fedora 12 ATI Catalyst Drivers">Fedora 12 ATI Catalyst Drivers</a></li>
<li><a href="http://gofedora.com/how-to-configure-squid-proxy-server/"  title="How To: Configure Squid Proxy Server">How To: Configure Squid Proxy Server</a></li>
<li><a href="http://gofedora.com/news-ati-catalyst-drivers-10-2-released-no-fedora-12-support/"  title="News: ATI Catalyst Drivers 10.2 Released. No Fedora 12 Support.">News: ATI Catalyst Drivers 10.2 Released. No Fedora 12 Support.</a></li>
<li><a href="http://gofedora.com/news-will-ati-catalyst-drivers-9-12-work-with-fedora-12/"  title="News: Will ATI Catalyst Drivers 9.12 work with Fedora 12?">News: Will ATI Catalyst Drivers 9.12 work with Fedora 12?</a></li>
</ul>
<p><a href="http://gofedora.com/" >Fedora Tutorials</a> and <a href="http://cachevideos.com/" >Videocache</a> by <a href="http://saini.co.in/" >Kulbir Saini</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gofedora.com/how-to-install-configure-gitweb/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
