==================git ssh=======================
=
=git server
=
# yum install openssh-server
# yum install git
# systemctl start sshd
# systemctl enable sshd
# useradd git -d /home/git
# passwd git
# su git
# mkdir ~/repos/test.git -p
# cd ~/repos/test.git
# git --bare init
# chmod -R 750 /home/git
=
=git client
=
# git config --global user.email "you@example.com"
# git config --global user.name "Your Name"
# git clone git@localhost:~/test.git
# cd test
# echo 'readme.txt' > readme.txt
# git add ./*
# git commit -m "add readme.txt for test"
# git push origin master
=================git web server(gitweb) ====================
=
=git server
=
# yum install gitweb httpd
# cat /etc/gitweb.conf
$projectroot = "/home/git/repos";
# usermod -a -G git apache
# cat /etc/httpd/conf.d/git.conf
Alias /git /var/www/git
Options +ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride All
#apache2.2
order allow,deny
Allow from all
#apache2.4
Require all granted
AddHandler cgi-script .cgi
DirectoryIndex gitweb.cgi
# systemctl restart httpd
=
=git client
=
# w3m
=================git web server(gitlab) =====================
阅读(2664) | 评论(0) | 转发(0) |