CATEGORY: Git

Install GIT server on Ubuntu

Prerequisites:

git should be  pre installed on the machine which we are trying to install the git server, If it is installed follow the steps given below, If not please read here for the installation on git on ubuntu.

Steps to install Git Server on Ubuntu

  1. Make a user with name git:
    useradd git
  2. Switch to the home directory of user git:
    cd /home/git
  3. Download the package(gitolite) from by typing the following command:git clone git://github.com/sitaramc/gitolite
  4. Make a new directory bin inside the home directory of the git user:
    mkdir /home/git/bin
  5. Install gitolite:
    gitolite/install -ln
  6. Create a public key on your local machine:
    1. Check if a public key alredy exists:
      cd ~/.ssh
    2. If the key already exists move to step 7, else generate a new key by:
      ssh-keygen -t rsa -C “your_email@example.com”
  7. Place the public key in the home directory on the server
    scp <public_key> your_username@remotehost.edu:/some/remote/directory
  8. From the home directory on the server run:
    gitolite setup -pk your-public-key.pub
  9. From the Client mahcine, clone the repository:
    git clone git@host:<path of gitolite-admin.git on server machine>

Install Git on Ubuntu

Steps for installing git on Ubuntu:

  1. Install the dependencies which are required before installing git:
    sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev build-essential
  2. Download the latest version of Git from Google Code
    wget https://git-core.googlecode.com/files/git-1.8.1.2.tar.gz
  3. Untar and Switch to that directory:
    tar -zxf git-1.8.1.2.tar.gz
    cd git-1.8.1.2
  4. If you want to do a global install, install it once as yourself and once as root, using the sudo prefix:
    make prefix=/usr/local all
    sudo make prefix=/usr/local install

Done..!

There are no more results.