Chinaunix首页 | 论坛 | 博客
  • 博客访问: 316634
  • 博文数量: 89
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 691
  • 用 户 组: 普通用户
  • 注册时间: 2015-09-20 16:58
文章分类

全部博文(89)

文章存档

2017年(1)

2016年(35)

2015年(53)

我的朋友

分类: LINUX

2016-12-18 10:41:27

==================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) =====================

阅读(2670) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~