版本管理工具:Gitlab
来源:互联网 发布:nginx负载均衡配置 编辑:程序博客网 时间:2024/06/05 09:31
与集中式的版本管理工具不同, git采用分布式的版本管理方式. 由于最为广泛使用的git的仓库github只提供public的免费版本,所以更适合开源项目的管理,priavte仓库收费加之数据保留在远端的服务方式,很多企业需要创建供自己使用的github,功能非常类似的gitlab此时就能派上用场了。
Docker pull
# docker pull docker.io/gitlab/gitlab-ce
Docker run
事前准备
#mkdir -p /srv/gitlab/config /srv/gitlab/logs /srv/gitlab/data
docker run
docker run --detach \ --hostname host32 \ --publish 443:443 --publish 80:80 \ --name gitlab \ --restart always \ --volume /srv/gitlab/config:/etc/gitlab \ --volume /srv/gitlab/logs:/var/log/gitlab \ --volume /srv/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:latest
登陆画面
登陆后画面
创建Group
创建后
创建Project
创建后
创建一个Readme文件
设定gitlab的ssh连接
本地的ssh的public key的内容(如果没有请用ssh-keygen生成)
[root@host32 ~]# cat /root/.ssh/id_rsa.pubssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4D2H3/kkuRAb88tGyB83pvc0lGTEyOUa2nE4Lzi8YXC+7/o4oG3EQrhTNIMuMAh81ZqmdTwLNbI5yk6Q4GHkRpClYneX3yg7YG6uD2kJWeCAYDOFxPwB/HxvT9swhb5x3ZZXQ1bTLSS1SBxp6Fh5zQS8wkM/Ql1w9YPWx8+OY4VVa8CuhiCRpagM7fGhWjUH63MugGHiT5Ku7Ef6KvinK8ajES7K3EOkMm8noBYp0Da5D2Ggy6+dP7hrpv4XIQDe+lHfdC8eWhXW3kLY1bclLGq2I82S3+P0uzPgo437SDbj0+9JGg9clUTSnZBFUd6eO5WejgjgEmqTSw9/U10UD root@host32[root@host32 ~]#
设定gitlab的ssh
使用git 与gitlab连接
使用git clone连接到gitlab
[root@host32 ~]# git clone http://192.168.32.32/devgroup/pilotproject.gitCloning into 'pilotproject'...Username for 'http://192.168.32.32': rootPassword for 'http://root@192.168.32.32':remote: Counting objects: 3, done.remote: Total 3 (delta 0), reused 0 (delta 0)Unpacking objects: 100% (3/3), done.[root@host32 ~]# ls -l pilotproject/total 4-rw-r--r--. 1 root root 5 Aug 6 06:20 README.md[root@host32 ~]# cat pilotproject/README.mdhello[root@host32 ~]#
更新信息
[root@host32 ~]# cd pilotproject/[root@host32 pilotproject]# lltotal 4-rw-r--r--. 1 root root 5 Aug 6 06:20 README.md[root@host32 pilotproject]# cat README.mdhello[root@host32 pilotproject]# echo "updated..." >>README.md[root@host32 pilotproject]# cat README.mdhelloupdated...[root@host32 pilotproject]# git add README.md[root@host32 pilotproject]# git commit -m "update"[master a26e6f7] update 1 file changed, 1 insertion(+), 1 deletion(-)[root@host32 pilotproject]# git pushwarning: push.default is unset; its implicit value is changing inGit 2.0 from 'matching' to 'simple'. To squelch this messageand maintain the current behavior after the default changes, use: git config --global push.default matchingTo squelch this message and adopt the new behavior now, use: git config --global push.default simpleSee 'git help config' and search for 'push.default' for further information.(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode'current' instead of 'simple' if you sometimes use older versions of Git)Username for 'http://192.168.32.32': rootPassword for 'http://root@192.168.32.32':Counting objects: 5, done.Writing objects: 100% (3/3), 247 bytes | 0 bytes/s, done.Total 3 (delta 0), reused 0 (delta 0)To http://192.168.32.32/devgroup/pilotproject.git f5b9ccd..a26e6f7 master -> master[root@host32 pilotproject]#
从gitlab上确认更新的内容
1 0
- 版本管理工具:Gitlab
- 使用GitLab版本管理工具教程
- GitLab版本管理
- GitLab版本管理
- GitLab版本管理
- GitLab版本管理
- GitLab版本管理
- hg版本管理工具使用
- 分布版本管理工具
- 版本管理工具SVN
- 分布式版本管理工具GIT
- 版本管理工具--SVN
- SVN版本管理工具使用说明
- hg版本管理工具使用
- 常见版本管理工具
- SVN版本管理工具简介
- Git 版本管理工具
- Bazaar版本管理工具 Ubuntu
- RecyclerView侧滑菜单,滑动删除,长按拖拽,下拉刷新上拉加载
- 10个用好模糊效果的超实用设计技巧
- 编程练习(2)
- Linux操作系统rpm包安装方式步骤
- [树状数组] hdu 5372 Segment Game
- 版本管理工具:Gitlab
- mysql事物处理
- C#入门3.4——数据类型之引用类型
- react native use map function
- 复数类的完整实现(C++版)
- c++之STL(13) STL 算法 - 查找算法(1)
- UVA725 UVALive5362 Division
- C++拷贝构造函数(深拷贝,浅拷贝)
- 【LEETCODE】375- Guess Number Higher or Lower II [Python]