目录

gitlab(centos7)
在我看来,这三者的关系是,Git是钥匙,GitHub是公共场所,GitLab是自家房子。
GitLab
1.install gitlab
yum -y install policycoreutils openssh-server openssh-clients postfix
systemctl enable postfix && systemctl start postfix
centos 7系统的下载地址1:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
centos 7系统的下载地址2:https://packages.gitlab.com/gitlab/gitlab-ce
rpm -i gitlab-ce-11.6.1-ce.0.el7.x86_64.rpm
vim /etc/gitlab/gitlab.rb
gitlab-ctl reconfigure
(gitlab-ctl restart)
2.SSH keys:
Settings->SSH keys->generate one看文档
cd ~/.shh
ls
cat ~/.ssh/id_rsa.pub
3.版本号
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
[260254@localhost 下载]$ rpm -qa|grep gitlab-ce-11.6.3-ce.0.el7.x86_64
gitlab-ce-11.6.3-ce.0.el7.x86_64
[260254@localhost 下载]$ rpm -q gitlab-ce-11.6.3-ce.0.el7.x86_64
gitlab-ce-11.6.3-ce.0.el7.x86_64
[260254@localhost 下载]$ rpm -q gitlab-ce-11.6.1-ce.0.el7.x86_64
未安装软件包 gitlab-ce-11.6.1-ce.0.el7.x86_64
[260254@localhost 下载]$ rpm -e gitlab-ce-11.6.1-ce.0.el7.x86_64
在卸载gitlab然后再次安装执行sudo gitlab-ctl reconfigure
的时候往往会出现:ruby_block[supervise_redis_sleep] action run
,会一直卡无法往下进行!
解决方案:
1、按住CTRL+C强制结束;
2、sudo systemctl restart gitlab-runsvdir
3、sudo gitlab-ctl reconfigure
6.查看端口是否被占用
[260254@localhost ~]$ sudo lsof -i:8080
git(windows)
-----------------------20191215(win7下的git)-----------------------------------
git config --global user.name "kuochung"
git config --global user.email "jxgxzgc@163.com"
git clone [git xxxx]
git init # git init --bare
git remote add origin [git xxxx]
git add .
git commit -m "first commit"
git push -u origin master
git push origin --delete [branchName] // 删除远程分支
git branch -d [branchName