MMNCS.COM
  • Web
    • WordPress
    • Joomla
    • Drupal
  • Tips & Tricks
    • Youtube
    • WordPress
    • Windows
    • Web
    • Twitter
    • Linux Ubuntu
    • Google
    • Facebook
    • Drupal
    • Developer
    • Designer
    • Apple
  • Tech News
    • Windows Phone
    • Servers
    • Search Engines
    • Nokia
    • Microsoft
    • iPhone
    • Google
    • Facebook
    • Browsers
    • Apple
  • Social Media
    • Youtube
    • Yahoo
    • Twitter
    • Google+
    • Facebook
  • Server
    • Web Server
      • NGINX
      • Apache Web Server
    • Ubuntu
    • Security
      • Access Control
    • Mail Server
    • Hosting
    • FTP Server
    • Firewall
    • Database
      • MySQL
    • Backup
  • SEO
    • Yahoo Search
    • Google Search
    • Google AdSense
    • Bing
  • Off-Topic
    • Weird
    • Music
    • Fun
    • Documentaries
  • Mobile
    • Windows Phone 7
    • iPhone
    • Android
  • Google
    • Google Translate
    • Google Plus
    • Google PageRank
    • Google Adwords
    • AdSense
  • Design & Dev
    • Webdevelopment
    • Version Control
      • Git Version Control
    • Programming
    • PHP
    • JavaScript
    • HTML
    • Development Environment
    • CSS

Related

  1. How to install and setup php development environment using Eclipse, LAMP and xDebug on Linux Ubuntu 10.04 & 11.04 [Developer]
  2. How to delete a git repository administered by gitolite
  3. How to use Putty or MSysGit on Windows to login securely on Linux via OpenSSH with public and private key pairs
  • Share on Tumblr

How to install and setup a Git Repository Server using Gitolite on Linux Ubuntu 11.04 or 10.04 with Windows clients using MSysGit

by MMNCS on June 6th, 2011, updated July 19, 2011
Git Distributed Version Control

This guide shows you how to install and setup a Git Repository Server using Gitolite on Linux Ubuntu with Windows clients using MSysGit. It also includes how to use multiple SSH keys in MSysGit.

Git is… a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Visit the official site for lots and lots of documentation: http://git-scm.com/

What is Gitolite? Gitolite lets you use a single user on a server to host many git repositories and provide access to many developers, without having to give them real userids on or shell access to the server. The essential magic in doing this is ssh’s pubkey access and the authorized_keys file, and the inspiration was an older program called gitosis.

Gitolite can restrict who can read from (clone/fetch) or write to (push) a repository. It can also restrict who can push to what branch or tag, which is very important in a corporate environment. Gitolite can be installed without requiring root permissions, and with no additional software than git itself and perl. It also has several other neat features described below and elsewhere in the doc/ directory.

I would recommend to read the documentation found on the official page: https://github.com/sitaramc/gitolite

 

If you are using Linux Ubuntu or other Debian distributions use this guide instead: How to install and setup a Git Repository Server using Gitolite on Linux Ubuntu 11.04 Server and Client

 

Start on your Server and create the gitolite admin account git:

~$ sudo adduser git

 

On you Windows client in MSysGit create the SSH keys for the gitolite admin account git. If you haven’t installed MSysGit on your client read this guide first:
How to install and Setup GIT on Windows 7 using either MSysGit or Cygwin

~$ cd ~
~$ ssh-keygen -v -t rsa -C username@hostname

Note!: In this example I created the keys with the name git.

 

Copy your public key to the Server. The key should be in your /home/.ssh/ directory unless something have played with your path.

~$ scp ~/.ssh/git.pub git@hostname:git.pub

 

SSH to the Server and log in as root

~$ ssh git@hostname
~$ su

 

Install the Git on the Server. The git-core contains all the basic commands for Git.

~$ sudo apt-get install git-core

 

Log in as the gitolite admin user account:

~$ su - git

 

Install gitolite

Download to home dir:

~$ git clone git://github.com/sitaramc/gitolite gitolite-source

 

Output:

Initialized empty Git repository in /home/git/gitolite-source/.git/
remote: Counting objects: 3984, done.
remote: Compressing objects: 100% (1614/1614), done.
remote: Total 3984 (delta 2737), reused 3405 (delta 2322)
Receiving objects: 100% (3984/3984), 1.01 MiB | 752 KiB/s, done.
Resolving deltas: 100% (2737/2737), done.

 

Install from home dir:

~$ cd gitolite-source/

~/gitolite-source $ mkdir -p ~/bin ~/share/gitolite/conf ~/share/gitolite/hooks

~/gitolite-source $ src/gl-system-install ~/bin ~/share/gitolite/conf ~/share/gitolite/hooks

~/gitolite-source $ cd ~

~$ gl-setup git.pub

Note!: If the bash can’t find gl-setup, be sure to add it to your path in your profile(.profile) – In my case I just had to log out and in, since the $PATH include was wrapped in a if clause.

Output ( too exit vi hit :q and enter ):

The default settings in the rc file (/home/git/.gitolite.rc) are fine for most
people but if you wish to make any changes, you can do so now.

hit enter...
creating gitolite-admin...
Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/
creating testing...
Initialized empty Git repository in /home/git/repositories/testing.git/
[master (root-commit) 028c1b6] start
2 files changed, 6 insertions(+), 0 deletions(-)
create mode 100644 conf/gitolite.conf
create mode 100644 keydir/git.pub

 

Pages: 1 2

You may be interested in

  1. How to use Putty or MSysGit on Windows to login securely on Linux via OpenSSH with public and private key pairs
  2. How to install and setup php development environment using Eclipse, LAMP and xDebug on Linux Ubuntu 10.04 & 11.04 [Developer]
  3. How to delete a git repository administered by gitolite
  4. How to change your hostname on a Linux Server
  5. How to password protect Apache directory for unwanted users using a htaccess file on a Linux Server

support and subscribe to the site

Follow @mmncs
Posted in Backup, Git Version Control, Off-Topic, Security, Server, Ubuntu Tags: 2011, Configure, Dedicated Server, Distributed Version Control, Education, Git Version Control, Gitolite, Guide, Install, Learning, Linux, msysgit, Setup, SSH keys, ubuntu, Ubuntu 11.04, VPS, windows
« How to install and setup php development environment using Eclipse, LAMP and xDebug on Linux Ubuntu 10.04 & 11.04 [Developer]
A List of Useful & Common Git Commands Explained [Developer] »


Comments

You can leave a response, or trackback from your own site.
  1. 4-1-2012
    Jeff Wurz

    I used this but there was a problem with the location of the repository you are supposed to clone on page 2. it reads “git clone git@hostname:gitolite-admin”, when it should be “git clone git@hostname:~/repositories/gitolite-admin” at least with a fresh install of 10.04.

    Reply

Leave a Reply

Click here to cancel reply.

Trackbacks & pingbacks

  1. 11-7-2011
    How to install and setup a Git Repository Server using Gitolite on Linux Ubuntu 11.04 Server and Client | MMNCS says: [...] Ubuntu Client in the bash create the SSH keys. If you are using Windows use this guide instead: How to install and setup a Git Repository Server using Gitolite on Linux Ubuntu with Windows clients... ~$ cd ~ ~$ ssh-keygen -v -t [...]
  2. 20-7-2011
    Install Setup Git Gitolite Repository Server Windows MSysGit | MMNCS | Linux Affinity says: [...] the original post: Install Setup Git Gitolite Repository Server Windows MSysGit | MMNCS Posted in: How To's, Server ADD [...]

Search terms for this article

  • gitolite remove public key,
  • gitolite generate client key,
  • setup git server on windows,
  • win7 cygwin gitolite,
  • gitolite public key windows,
  • git for windows 7 gitolite use public key,
  • msysgit+eclipse+download+repository+,
  • aptget gitlite,
  • set up repository with msysgit,
  • gitolite deploy php,
  • ubuntu git server gitolite,
  • ssh keygen windows gitolite,
  • windows gitolite server free,
  • msysgit apache htaccess,
  • windows msysgit openssh git server,
  • how to connect gitolite server with msysgit,
  • gitolight cygwin windows,
  • windows msysgit gitolite,
  • public git repo windows,
  • installing gitolite windows,
  • gitolite installation on windows machine,
  • ubuntu gitolite windows,
  • windows git gitolite,
  • gitolite recommended linux distro,
  • msysgit gitserver,
  • gitolite git tutorial ubuntu,
  • intall gitolite no windows,
  • +gitolite +howto +delete +repository,
  • gitolite download,
  • setting up git server 2011 windows,
  • Subscribe

    Find MMNCS.COM on Facebook, about guides, tutorials and learning within webdevelopment, drupal, MySQL, PHP, WordPress, SEO...
    Follow MMNCS.COM on Twitter and get the latest updates
    Follow @mmncs
    Subscribe to MMNCS.COM newsletter, about guides, tutorials and learning within webdevelopment, drupal, MySQL, PHP, WordPress, Programming, Technology, SEO...
  • The Best technology news guides tips tricks on the Internet
  • best online art gallery, paintings, illustrations, fine art photography
  • Services

    Check your Google PageRank checker optimize seo serp page rank
    Take a picture of any website, WordPress Screenshot demo
  • Latest

    Facebook Helps Breakup on One-Third of Marriages in the U.K.

    Facebook Helps Breakup on One-Third of Marriages in the U.K.

    December 30th, 2011

    Husbands and wives in the United Kingdom headed for divorce are increasingly citing Facebook in thei[...]

    Nokia Lumia 800 Demo of Skyscanner. Flight Deals Search for Windows Phone

    Nokia Lumia 800 Demo of Skyscanner. Flight Deals Search for Windows Phone

    December 30th, 2011

    Here's another awesome application for the Nokia Lumia 800 and other Windows Phones. Skyscanner allo[...]

    Nokia Lumia, Samsung, HTC rumored to announce LTE Windows Phone smartphones at CES

    Nokia Lumia, Samsung, HTC rumored to announce LTE Windows Phone smartphones at CES

    December 29th, 2011

    Rumor has it that the one thing that is notoriously missing (well, one of the things) from any Wind[...]

    Why I’m Replacing My iPhone With Nokia Lumia 800 And Why Android Is No Option

    Why I’m Replacing My iPhone With Nokia Lumia 800 And Why Android Is No Option

    December 7th, 2011

    Spoiler alert: This article is about how great the new Nokia Lumia 800 is, so if you are an iPho[...]

    Apple iPhone 4S Battery Drain Is Starting To Become A Serious Issue [iOs 5]

    Apple iPhone 4S Battery Drain Is Starting To Become A Serious Issue [iOs 5]

    November 29th, 2011

    Waiting on the next expected fix from Apple, iPhone 4S users complaining of rapid battery drain are [...]

  • musicfordriving com music for driving underground experimental electronic electronica dj rock jazz upcomming interesting music hot list hype
  • Selected

    Bill Gurley; Too Many Start-Ups Chase Too Little Cash

    Bill Gurley; Too Many Start-Ups Chase Too Little Cash

    November 14th, 2011

    Venture capitalist Bill Gurley has noticed something new this autumn: a big jump in the number of wh[...]

    The Best Programming Contest Ever Made – The AI Challenge Ants 2011 [Developer]

    The Best Programming Contest Ever Made - The AI Challenge Ants 2011 [Developer]

    October 30th, 2011

    The best programming contest ever made! Well that is what they state. The AI Challenge Ants 2011 is [...]

    Take A Picture Of Any Website [WordPress Screenshot Demo]

    Take A Picture Of Any Website [WordPress Screenshot Demo]

    October 28th, 2011

    Take a picture of any website. Just enter the website address in the form and press the button "Take[...]

    Optimize Your Time And Write Better CSS With {less} – [CSS Stylesheets]

    Optimize Your Time And Write Better CSS With {less} - [CSS Stylesheets]

    October 23rd, 2011

    If you think parts of CSS is repetitive, tedious, and … well, very boring. Have a look here. LESS [...]

    Call Your Friends For Free –  Cut The Expensive Voice And Text Plans To The Bare Minimum [Mobile Apps]

    Call Your Friends For Free - Cut The Expensive Voice And Text Plans To The Bare Minimum [Mobile Apps]

    October 14th, 2011

    After been using Viber for some time now. We highly recommend this mobile application for all smartp[...]

  • News

    Facebook Helps Breakup on One-Third of Marriages in the U.K.

    Facebook Helps Breakup on One-Third of Marriages in the U.K.

    December 30th, 2011

    Husbands and wives in the United Kingdom headed for divorce[...]

    Nokia Lumia 800 Demo of Skyscanner. Flight Deals Search for Windows Phone

    Nokia Lumia 800 Demo of Skyscanner. Flight Deals Search for Windows Phone

    December 30th, 2011

    Here's another awesome application for the Nokia Lumia 800 and[...]

    Nokia Lumia, Samsung, HTC rumored to announce LTE Windows Phone smartphones at CES

    Nokia Lumia, Samsung, HTC rumored to announce LTE Windows Phone smartphones at CES

    December 29th, 2011

    Rumor has it that the one thing that is notoriously missing[...]

  • Social Media

    Solved: Facebook XFBML Like Button Bug Creates a Vertical Scroll-Bar [Web Developer]

    Solved: Facebook XFBML Like Button Bug Creates a Vertical Scroll-Bar [Web Developer]

    September 16th, 2011

    After been doing a lot of work on the site I noticed when testing in IE8 and Firefox 3.6.x that I wa[...]

    Add a Cool Google Plus Profile Add to Circles Widget to Your Website [Google Plus]

    Add a Cool Google Plus Profile Add to Circles Widget to Your Website [Google Plus]

    August 11th, 2011

    Google Plus has created a very simple widget to embed your Google Plus profile on websites. This wid[...]

    How To Export All Your Facebook Friends To Google+ Using Yahoo Mail [Google+]

    How To Export All Your Facebook Friends To Google+ Using Yahoo Mail [Google+]

    August 8th, 2011

    Since the popular Chrome extension Facebook Friends Exporter got blocked we needed another way of ge[...]

  • Google

    Check Your Google Page Rank Here – Updated To Use The New Google PageRank Query URL

    Check Your Google Page Rank Here - Updated To Use The New Google PageRank Query URL

    October 8th, 2011

    Check PAGE RANK of Web site pages Instantly This is a free service to check Google™ page rank ins[...]

    Add a Simple Google Translate DropDown Box To Your Web Site [Tips & Tricks]

    Add a Simple Google Translate DropDown Box To Your Web Site [Tips & Tricks]

    September 6th, 2011

    Google Translate is the best free online translation service today and I often wonder why I rarely s[...]

    Google Closes Down 10 Mayor Business Areas [Tech News]

    Google Closes Down 10 Mayor Business Areas [Tech News]

    September 5th, 2011

    Google closes down 10 business areas in which the company itself calls "autumn-cleaning."The cle[...]

  • Home
  • About
  • Contact
  • Wollawonka
Copyright © MMNCS.COM is a site aimed at web developers, system engineers and designers offering tutorials and articles on technologies, skills and techniques to improve how you design and build websites. We cover Open Source recommendations, Linux Server guides, PHP, HTML, CSS, Drupal & WordPress Tutorials, Guides, Tips & Technology News.