Centos6.3/debian6, 7 Build a git server 1. centosos: centos63 (Final) git: 1.7.1gitolite step is very simple, you need to install git, ssh support, gitolite, and then public key. 1. log on to the server... centos6.3/debian6, 7 Build a git server 1. centos OS: centos63 (Final) git: 1.7.1 gitolite steps are simple. you need to install git, ssh support, gitolite, and then public key. 1. log on to the server and install it. (# It is after root logon .) # yum install perl openssh git cannot be installed, so install the following dependencies # yum install curl-devel expat-devel gettext-devel openssl-devel zli B-devel perl-devel2. create a user # adduser -- system -- shell/bin/sh -- create-home -- home-dir/home/git # cd/home/git # mkdir repositories # chown git: git-R. /repositories # chmod 700. /repositories 3. switch to the just-built git User ($ indicates the user) # su git $ git clone git: // github.com/sitaramc/gitolite $ mkdir-p $ HOME/bin $ gitolite/install-to $ HOME/bin. if the missing module is reported, you need to switch to the root to install the missing module. for example, perl-Time-HiRes $ su-enter the root password of the server # yum ins Tall perl-Time-HiRes # su git $ gitolite/install-to $ HOME/bin. the installation is complete. local machine. here I am debian, # ssh-keygen # cd/root /. ssh contains id_ras.pub and id_rsa. one is the public key and the other is the private key. if you have installed openssl to generate a key, do not overwrite the/tmp # scp ~ copied to the server ~ /. Ssh/id_rsa.pub server_username @ server_host:/tmp enter the password to return to the server, # cd/tmp # mv id_rsa.pub admin. why should I change pub to admin. pub uses gitolite to set up an account based on the file name. here I use admin # su git to switch to git User $ HOME/bin/gitolite setup-pk admin. pub and go to/home/git/repositories to see the repository file. gitolite-admin.git and test. git: manages the repository, and tests the code of pulling servers from the local machine # git clone git @ server_host: after gitolite-admin enters the repository, you can see conf, keydir, conf/gitolite. conf is the configuration for adding a user/repository, and keydir is the public key of the corresponding user. after modification, you can push it directly.
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.