How To Install A Public Git Repository On A Debian Server
How To Install A Public Git Repository On A Debian ServerGit is a free distributed revision control, was initially created by Linus Torvalds for Linux kernel development. It is primarily developed on Linux, but can be used on other Unix operating systems including BSD, Solaris and Darwin. Git is extremely fast on POSIX-based systems such as Linux. It differs from svn and creates a private repository on a remote server too. Some popular projects using Git: * YUI Well, we'll focus on how to install git and gitweb on the Debian distribution. gitweb is a git web interface written in Perl, and can be used as a CGI script or as mod_Perl, and it will allow us browsing a git repository. Let's start. Getting git and gitweb packages from the Debian repository with aptitude: $ sudo aptitude install git-core gitweb Create some useful directories: /var/cache/git (the git repository), /var/www/git contains the gitweb.cgi: $ sudo mkdir /var/www/git $ [ -d "/var/cache/git" ] || sudo mkdir /var/cache/git In our example the directory /var/www is Apache's DocumentRoot; make a git configuration in the Apache configuration directory: $ sudo cat vim /etc/apache2/conf.d/git <Directory /var/www/git> Allow from all AllowOverride all Order allow,deny Options ExecCGI <Files gitweb.cgi> SetHandler cgi-script </Files> </Directory> DirectoryIndex gitweb.cgi SetEnv GITWEB_CONFIG /etc/gitweb.conf Move gitweb.cgi, logo and css files into /var/www/git: $ sudo mv /usr/share/gitweb/* /var/www/git $ sudo mv /usr/lib/cgi-bin/gitweb.cgi /var/www/git Make some changes in /etc/gitweb.conf: $ sudo vim /etc/gitweb.conf $projectroot = '/var/cache/git/'; $git_temp = "/tmp"; #$home_link = $my_uri || "/"; $home_text = "indextext.html"; $projects_list = $projectroot; $stylesheet = "/git/gitweb.css"; $logo = "/git/git-logo.png"; $favicon = "/git/git-favicon.png"; Reload the git config into Apache: $ sudo /etc/init.d/apache2 reload First, initialize git in our project by creating a repository and setting name and email: $ cd /var/cache/git/ $ mkdir project.git $ cd project.git $ git init $ echo "Short project's description" > .git/description $ git config --global user.name "Your Name" $ git config --global user.email "you@example.com" $ git commit -a Marking a repository as exported is done by using the file git-daemon-export-ok. $ cd /var/cache/git/project.git $ touch .git/git-daemon-export-ok Git has a mini-server for git repositories. It is small and cute, and suitable for sharing repositories. Starting git daemon with our repository as base path, base-path should not end in a slash. $ git daemon --base-path=/var/cache/git --detach --syslog --export-all Now the git daemon is running on port 9418 on your computer, we can start to use it with the URL git:///location. You can do a copy to your development environment: $ git clone git://server/project.git project If our clone succeeded, we should now have a local directory called project.
|
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
One number. one voicemail. Seize the lead with Sprint. Learn more
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning
Learn benefits of Simpana software.
View the Gartner Video
Sprint 4G - The Ultimate Mobile Broadband
Click here
SAP-Business Objects Crystal Reports Server
Complete reporting without hidden costs. Free Trial







Recent comments
4 hours 4 min ago
9 hours 58 min ago
15 hours 41 min ago
19 hours 47 min ago
21 hours 11 min ago
21 hours 52 min ago
21 hours 59 min ago
22 hours 33 min ago
1 day 1 hour ago
1 day 19 hours ago