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实现 ...
随机推荐
- mapreduce编程模型你知道多少?
上次新霸哥给大家介绍了一些hadoop的相关知识,发现大家对hadoop有了一定的了解,但是还有很多的朋友对mapreduce很模糊,下面新霸哥将带你共同学习mapreduce编程模型. mapred ...
- Chapter10:泛型算法
泛型算法的基础是迭代器. 迭代器令算法不依赖于容器,但是算法依赖于元素类型的操作.也即:算法永远不会执行容器的操作. 那么,如果想向容器中添加元素或者执行其他的一些操作呢?标准库提供了插入迭代器来完成 ...
- 朝鲜RedStar_OS_3.0安装图解
前天exploit-db上出现了3个Local Exploit,都是来自朝鲜的RedStar 3.0的vul.网上也下到了镜像,按网上的方法测试了下,真的是 ————————————————————— ...
- PHPCURL直接访问JSONRPC服务
<?php $ch = curl_init(); $url = 'http://localhost/jsonrpc?tm='.time().mt_rand (100,999); //参数是为了防 ...
- HBase高性能复杂条件查询引擎---二级多列索引
http://www.infoq.com/cn/articles/hbase-second-index-engine 原理 “二级多列索引”是针对目标记录的某个或某些列建立的“键-值”数据,以列的值为 ...
- INTEL XDK 真机调试
需要安装 1.google服务框架 2.google play 3.app preview
- cocos2d-js屏幕任何位置点击开始的实现
ctor:function () { this._super(); if ('mouse' in cc.sys.capabilities) cc.eventManager.addListener({ ...
- 转】Linux下安装Tomcat服务器和部署Web应用
原博文出自于: http://www.cnblogs.com/xdp-gacl/p/4097608.html 感谢! 一.上传Tomcat服务器
- 泡泡堂、QQ堂游戏通信架构分析
http://blog.csdn.net/sodme/article/details/468327#comments ————————————————————————————————————————— ...
- 在VS2013中使用水晶报表
又遇到了在B/S系统中打印,打印格式要求比较高,打印出的效果要求高大上.用VS2013中微软自带的报表,实在难以实现应用的效果,主要问题表现在: 1.不能插入用Word做好的打印模板,自己按照模板来做 ...