搭建一个git 私有仓库
2017-06-29 15:10
239 查看
环境: centos7
安装 git 工具
yum install -y git
新建git 用户,禁止shell登录
adduser git
vim /etc/passwd
# cat /etc/passwd |grep git
git:x:1000:1000::/data/git:/usr/bin/git-shell
3. 进入git 用户主目录
cd /data/git
4. 创建一个裸仓库,一般以.git结尾
git init --bare test.git
5. 修改仓库用户宿主
chown -R git:git test.git
1.在客户端 直接请求
git clone ssh://git@192.168.100.112:2018/data/git/test.git
默认ssh端口是22,则可以用以下的格式
git clone git@192.168.229.130:test.git
2.推送远程服务器 (第一次加上-u参数)
git push -u origin master
安装 git 工具
yum install -y git
新建git 用户,禁止shell登录
adduser git
vim /etc/passwd
# cat /etc/passwd |grep git
git:x:1000:1000::/data/git:/usr/bin/git-shell
3. 进入git 用户主目录
cd /data/git
4. 创建一个裸仓库,一般以.git结尾
git init --bare test.git
5. 修改仓库用户宿主
chown -R git:git test.git
1.在客户端 直接请求
git clone ssh://git@192.168.100.112:2018/data/git/test.git
默认ssh端口是22,则可以用以下的格式
git clone git@192.168.229.130:test.git
2.推送远程服务器 (第一次加上-u参数)
git push -u origin master
相关文章推荐
- 使用 satis 搭建一个私有的 Composer 包仓库
- 在Dropbox上搭建私有的Git仓库的教程
- Git基础+私有仓库搭建傻瓜式操作
- Git 搭建私有仓库
- git 服务器搭建,在自己服务器上搭建私有仓库
- 搭建私有Git仓库
- Git 搭建私有仓库
- 在Dropbox上搭建私有的Git仓库的教程
- git 服务器搭建,在自己服务器上搭建私有仓库
- 建立一个git私有仓库
- git私有仓库搭建
- 在Dropbox上搭建私有的Git仓库的教程
- git 服务器搭建,在自己服务器上搭建私有仓库
- 配置私有仓库(使用registry镜像搭建一个私有仓库)
- 使用 satis 搭建一个私有的 Composer 包仓库 在我们的日常php开发中可能需要使用大量的composer包,大部份都可以直接使用,但在公司内部总有一小部份包是不能公开的,这时候我们就需
- git 服务器搭建,在自己服务器上搭建私有仓库
- 基于Docker搭建或迁移Phabricator私有Git代码仓库
- 一步一步搭建git私有仓库服务器记录
- 在Dropbox上搭建私有的Git仓库的教程
- 在Dropbox上搭建私有的Git仓库的教程