Environment:
1. UNIX-like systems
2.git1.6.6+ perl5.8.8+ openssh5.0+
3. Warehouse users, self-add user git
4.ssh no key-free user
git-server:192.168.50.108
git-client:192.168.50.112
Deployment:
Git-server:
1. Use the GIT user's environment operation, or modify the git user's shell switch post deployment
Sudo-u git
git clone https://github.com/sitaramc/gitolite.git
mkdir $HOME/bin
./gitolite/install-to/home/git/bin/
2. Generate admin key (root as Administrator here)
SSH-KEYGEN-T RSA
cp/root/.ssh/id_rsa.pub/tmp/
Mv/tmp/id_rsa.pub/tmp/admin.pub
3. Configuring administrator Information for Gitolite
Gitolite setup-pk/tmp/admin.pub
Ls
Logout
4. The administrator uses the tool Git-server (unified tools Management, where the environment is operating under administrator root, if prompted to require a password, the operation is wrong. )
git clone [email protected]:gitolite-admin
5. Create a library and add users, configured here like SVN
CD gitolite-admin/&& ls (conf and keydir two directories)
Note: Conf record the user's permissions, Keydir store the user's Pub public key
6. Add and push to remote after modification
git add conf
git add Keydir
Git commit-m ' added Foo,bob '
git push
7. Check
Cat/home/git/.ssh/authorized_keys
Note: If you want to manage server on another computer as follows, you can ssh [email protected] help if needed
Git-client:
1. Refer to Git-server second step to generate SSH key
2. Refer to Git-server Third step to add administrator information
3. Refer to Git-server steps fourth and fifth, step sixth configuration information
Not finished (the permission module needs to be supplemented) ....
Reference Document: Https://github.com/sitaramc/gitolite
This article is from the "Rookie Growth Diary" blog, please be sure to keep this source http://startlinux.blog.51cto.com/10045010/1745847
SSH simple version Git-server 1 git-server Rights Management