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
- Sudo adduser git// Add a user and add a password to the user
- Su git// Switch to the git user
- Ssh-keygen// Generate the public key and Private Key
- // Enter a string to encrypt the Private Key
- Cd ~// Enter the root directory of the git user
- Cd. ssh// Enter the folder for storing the public key and Private Key
- Cp id_rsa.pub ../git. pub// Copy the public key to the git user root directory and rename it as an alternative
- Cd ../// Return the git root directory
- Git clone git:// Github.com/sitaramc/gitolite // clone gitolite code to the Local Machine
- Gitolite/src/gl-system-install// Execute gitolite Installation
- // If the following figure appears, warning WARN: gl-setup is not in your path:
- Export PATH =/home/git/bin: $ PATH// Execute the previous step again
- 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