在centos6上搭建git服务器
来源:互联网 发布:sas编程 编辑:程序博客网 时间:2024/05/01 12:35
前置条件
文中所使用的环境:centos6.5(64bit)
1. 下载安装git server
(以root
用户执行)
su
yum update
yum install git-core
检查Git是否安装成功
git –version
git version 1.7.1
2. 创建用户组及用户(以root
用户执行)
创建developers
用户组,然后添加git
用户,该用户属于developers
用户组,用户根目录为/home/git
。
groupadd developers
useradd -g developers git -d /home/git
passwd git
然后通过编辑/etc/group
文件将git加入到developers后面
developers:x:504:git
使用教程
1. 在Server端(以git
用户执行)
- 创建项目根目录
su git
cd /home/git
mkdir -p projName.git
- 用命令查看创建的目录
ls -l
最后看到的信息是:
drwxr-xr-x. 2 git developers 4096 6月 14 13:34 projName.git
(如果用户组或者用户信息不对,请执行下面命令)
chgrp developers projName.git
chown git projName.git
chmod g+rws projName.git
- 初始化项目
git init –bare –shared projName.git
Initialized empty shared Git repository in /home/git/projName.git/
2. 在客户端(以Eclipse lun
版本EGit
做客户端)
新建测试项目
分享项目
在Eclipse右键项目名 Team->Share Project
- 提交
右键项目名 Team->Commit
提交到服务器,Finish
(如果遇到eclipse Transport Error: The authenticity of host can't be established
),解决方案请参考:Eclipse + EGit - “The authenticity of host … can’t be established” challenge
- 在centos6上搭建git服务器
- 服务器上的 Git - 在服务器上搭建 Git
- 4.2 服务器上的 Git - 在服务器上搭建 Git
- 在CentOS6.2下搭建git服务器gitosis
- 在CentOS6.2下搭建git服务器gitosis
- 在CentOS6.2下搭建git服务器gitosis
- centos6.5搭建git服务器
- centos6.5搭建GIT服务器
- 在centos上搭建git服务器
- 在Ubuntu 12.04 上 搭建 Git服务器
- 在centos上搭建git服务器
- 在linux上搭建git服务器
- 在服务器上搭建 Git仓库
- 在阿里云上搭建Git 服务器
- git 服务器搭建,在自己服务器上搭建私有仓库
- git 服务器搭建,在自己服务器上搭建私有仓库
- git 服务器搭建,在自己服务器上搭建私有仓库
- 在Centos6.3上搭建FTP服务器vsftpd
- 属性参数
- hibernate的“ No suitable driver”错误
- Gson解析复杂的json数据
- 键盘VK键值列表
- SIFT检测特征点之找到主方向
- 在centos6上搭建git服务器
- 【牛腩新闻发布系统 一】如何高效写代码
- 使用PHP制作 简易员工管理系统之七(MVC实现用户信息增、删、改、查)
- KVC
- 开始刷leetcode day40:Set Matrix Zeroes
- 技术 blog20 之 Java正则表达式 by 八戒
- Android之各种Adapter
- 我的Java开发学习之旅------>Java使用Fork/Join框架来并行执行任务
- #leetcode#Multiply Strings