centos 安装http协议的git server
1、服务器端安装httpd,git,gitweb等
|
1
|
#yum install httpd git git-daemon gitweb |
2、服务器端初始化仓库
|
1
2
3
|
#mkdir -p /data3/gitserver#cd /data3/gitserver#git init --bare git_repo #初始化一个裸仓库 |
3、向裸仓库提交初始文件
|
1
2
3
4
5
6
7
|
#cd /tmp#git clone /data3/gitserver/git_repo#cd git_repo#touch MD#git add MD#git commit -m "init readme txt" MD#git push origin master |
4、建立smart http协议,用户可以用http协议访问git仓库
|
1
2
|
#cd /etc/httpd/conf.d#vim git.conf |
添加如下配置文件
|
1
2
3
4
5
6
7
8
9
10
|
ScriptAlias /gitserver/ /usr/libexec/git-core/git-http-backend/ <Directory "/usr/libexec/git-core/"> SetEnv GIT_PROJECT_ROOT /data3/gitserver SetEnv GIT_HTTP_EXPORT_ALL SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER Options +ExecCGI Order allow,deny Allow from all</Directory> |
5、配置gitweb信息,可以用web访问git仓库;
|
1
|
#vim /etc/gitweb.conf |
输入git仓库的路径
|
1
2
3
4
|
# Set the path to git projects. This is an absolute filesystem path which will# be prepended to the project path.#our $projectroot = "/var/lib/git";$projectroot = "/data3/gitserver"; |
6、重启 httpd
|
1
2
|
#chkconfig httpd on#service httpd start |
7、查看git仓库
http://ip_address/git
8、clone git 仓库
|
1
|
git clone http://ip_address/gitserver/git_repo |
9、如果push失败 ,到服务器作如下操作
|
1
2
3
4
|
#git push origin master#如果git push 失败#cd /data3/git_server/git_repo# git config daemon.receivepack true
|
centos 安装http协议的git server的更多相关文章
- Windows下安装 msysGit 以及初始化 Git server环境
Windows下git工具msysGit使用以及Git server初始化 Windows下git工具,这里选择msysGit,版本为msysGit-netinstall-1.8.1.2-previe ...
- CentOS安装sctp协议
转自:http://blog.csdn.net/fly_yr/article/details/48375247 序 最近学习Unix网络编程,在第10章节,SCTP客户/服务器 程序实现时,发现很多由 ...
- centOs安装出现No package git available的解决办法
来源地址 [http://chinacheng.iteye.com/blog/1825538 ] centos安装git 下载源代码安装后,git clone出现“fatal unable to fi ...
- Centos安装(更新)git(亲测有效)
Centos 6.5默认安装的是git 1.7.X 版本,使用过程中会有一些奇怪的问题,对于用户名.密码支持不是很友好.将Centos6.5上的git更新到2.0.5,方法如下: 1.安装编译git时 ...
- CentOS 安装 Ansible 以及连接Windows server的办法
1. CentOS机器上面按住那ansible yum install ansible 2. 安装 pywinrm 如果不安装 这个的话 ansible 会提示 没有 winrm 模块 注意需要先 ...
- Windows下搭建Git 服务器: BONOBO GIT SERVER + TortoiseGit
本文将介绍如何在Windows操作系统下搭建Git服务器和客户端.服务器端采用的是Bonobo Git Server,一款用ASP.NET MVC开发的Git源代码管理工具,界面简洁,基于Web方式配 ...
- CentOS安装Git实现多人同步开发
描 述 要开发一个"cms系统",有2个人分别是:晓飞, 盈月.要求使用Git来进行版本控制. 项目信息 版本控制:Git 项目名称:cms 开发人员:xiaofei,yingyu ...
- 【推荐】CentOS安装Subversion-1.8.11+HTTP协议支持配置
注:以下所有操作均在CentOS 6.5 x86_64位系统下完成. 我们需要搭建一个自己的SVN服务器. 此外,搭建好的SVN服务器除了需要支持svn协议外,最好还需要支持HTTP协议和HTTPS协 ...
- ubuntu 14.04 安装git server
版本信息 ubuntu : 14.04.1 git version 1.9.1 perl v5.10.1 ssh OpenSSH_6.6.1p1 本次安装的git server使用gitolite实现 ...
随机推荐
- SpringMVC + Spring + MyBatis 学习笔记:为MyBatis增加打印SQL功能 (最简化配置)
系统:WIN8.1 数据库:Oracle 11GR2 开发工具:MyEclipse 8.6 框架:Spring3.2.9.SpringMVC3.2.9.MyBatis3.2.8 1.以下jar包拷贝到 ...
- _margin和margin的区别
_margin和margin的区别 _margin和margin的区别 Question: margin:15px 300px 0px 100px; height:72px; width:188px; ...
- kali 重置 mysql 密码
You can recover MySQL database server password with following five easy steps. Step # 1: Stop the My ...
- 30+简约时尚的Macbook贴花
当Macbooks Pro电脑在他们的设计之下仍然漂亮.独一无二时,我想说,他们已经成为相当的主流了.有时候如果你回忆过去的很美好的日子,当人们偷偷欣赏你的技术装备 的时候,大概是为你的外表增加亮点的 ...
- Failed to read artifact descriptor--maven问题总结(能力工场)
在开发的过程中,作为新手,经常遇到Maven下载依赖的时候,"Failed to read artifact descriptor for xxx:jar"的错误 对于这种非业务相 ...
- 了解shell
1. shell 脚本文件第一行: #!/bin/sh 或 #!/bin/bash "#!" 又称为纪数,在执行bash脚本的时候,内核会根据它来确定该用哪个程序来解释脚本 ...
- Unix 环境高级编程---线程创建、同步、
一下代码主要实现了linux下线程创建的基本方法,这些都是使用默认属性的.以后有机会再探讨自定义属性的情况.主要是为了练习三种基本的线程同步方法:互斥.读写锁以及条件变量. #include < ...
- sql的union用法
sql中union是很常见的,尤其是创建视图时,完全离不开union. SQL UNION 操作符合并两个或多个 SELECT 语句的结果,UNION 内部的每个 SELECT 语句必须拥有相同数量的 ...
- OSPF虚链路配置.示例2
先看一个拓扑图 黄色区域是area0,即骨干区域,如果如图示RT1与RT6之间的链路断了,那么会出现骨干区域被“分裂”的情况,很明显骨干区域是不能被分割开的,出现这种状况的时候可能会影响到整个自制系统 ...
- javascript js 内存泄露工具使用
javascript内存泄露工具使用 原文:http://lanhy2000.blog.163.com/blog/static/43678608201121472644851/ 2011-03-14 ...