"SSH simple version git-server 1" Git-server Rights Management

Source: Internet
Author: User

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

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.