1. Add Git users
Useradd-m git
2. Change git user password (password is git)
passwd git
3. Unzip the git-1.7.12.2.tar.gz and install Git
TAR-XVF git-1.7.12.2.tar.gz
CD git-1.7.12.2
Make
Make install
4, initialize Git users, in order to install gitosis to prepare. To use Git on any machine, you have to initialize it for the first time:
git config--global user.name "git"
git config--global user.email "[Email protected]"
5, install setuptools-0.6c8.tar.gz, prepare for installing gitosis
TAR-XVF setuptools-0.6c8.tar.gz
CD SETUPTOOLS-0.6C8
Python setup.py Build
Python setup.py Install
6, Installation gitosis.tar.gz
TAR-XVF gitosis.tar.gz
CD gitosis
Python setup.py Install
7. Use eclipse to produce a public key, or use the following command to generate in Linux
SSH-KEYGEN-T RSA
The key is generated in the/HOME/GIT/.SSH directory
8. Use git user login to initialize warehouse
Su–git
Gitosis-init
9. Modification
chmod 755 \
/home/git/repositories/gitosis-admin.git/hooks/post-update
10. Use Eclipse to access the admin repository gitosis-admin.git
11. Import the Gitosis-admin.git warehouse as project into Eclipse, add users by adding a public key in the Keydir directory (after adding a commit), read and write permissions by modifying the gitosis.conf file (modified commit)
12, create a warehouse (we submit the code submitted to the warehouse)
mkdir Runtime.git
Git init--bare
13, modify the gitosis.conf file, increase access to the Runtime.git warehouse, use Eclipse to access the Runtime.git warehouse
Modify the following:
[gitosis]
[Group gitosis-admin]
writable = gitosis-admin
Members = RSA-1024
[Group Devloper]
writable = Runtime
Members = RSA-1024
Like on the attention
Build a git server under Linux