Install the Git server in Ubuntu11.10

Source: Internet
Author: User
As required by the project, a Git server (gitolite) needs to be built under Ubuntu11.10 ). 1. Install gitsudoapt-getinstallgit-core to check whether git has been installed successfully. git-version (two bars) 2. Install gitoliteSudoaddusergit & nb

For project purposes, a Git server (gitolite) needs to be built under Ubuntu 11.10 ).

1. Install git

Sudo apt-get install git-core

Check whether git is successfully installed.

Git -- version (two bars)

2. Install gitolite

  1. Sudo adduser git// Add a user and add a password to the user
  2. Su git// Switch to the git user
  3. Ssh-keygen// Generate the public key and Private Key
  4. // Enter a string to encrypt the Private Key
  5. Cd ~// Enter the root directory of the git user
  6. Cd. ssh// Enter the folder for storing the public key and Private Key
  7. Cp id_rsa.pub ../git. pub// Copy the public key to the git user root directory and rename it as an alternative
  8. Cd ../// Return the git root directory
  9. Git clone git:// Github.com/sitaramc/gitolite // clone gitolite code to the Local Machine
  10. Gitolite/src/gl-system-install// Execute gitolite Installation
  11. // If the following figure appears, warning WARN: gl-setup is not in your path:
  12. Export PATH =/home/git/bin: $ PATH// Execute the previous step again
  13. Gl-setup-q ~ /Git. pub// Add git. pub as the administrator and start

If gitolite is successfully installed, an administrator repository named gitolite-admin is automatically generated to manage other repositories.

The repositories in gitolite are all in the pure repository form, that is, there is no working directory. Therefore, when modifying or adding the working directory in any repository, you must first clone the repository.

Therefore, we need to clone gitolite-admin to verify that gitolite is successfully installed:

Gitclone git@127.0.0.1: gitolite-admin

Git repository address, which generally consists of git @ server: repositories,

Git is the exclusive user name of the server where gitolite is installed;

The server is the IP address or domain name of the server;

Repositories is the repository name or can be written as repositories. git.

Update:

Gitolite has been installed successfully since it was in use. Today, gitolite is installed on another computer. After git clone git: // github.com/sitaramc/gitolite, you cannot find gl-system-installin the SRC folder. It is estimated that the gitolite version is updated. Don't want to find the new gitolite installation method, so the old version of the gitolite-2.1 from the Internet. Unzip the use.

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.