环境:Centos7
安装配置(安装开启http和sshd):
1 yum -y install curl openssh-server postfix
2 systemctl enable sshd postfix
3 systemctl start sshd postfix
4 systemctl start firewalld
5 firewall-cmd --permanent --add-service=http
下载安装git包:
1 curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
2 yum -y install gitlab-ce
配置启动关闭:
1 gitlab-ctl reconfigure
2 gitlab-ctl status
3 gitlab-ctl stop
4 gitlab-ctl start
Git安装;配置git全局用户以及邮箱;
1 yum install git -y
2 git config --global user.name "alex"
3 git config --global user.email "alex@gmail.com"
4 git config --list --查看配置
登录;密匙;
1 ssh-keygen(linux)
2 浏览器直接输入主机ip(window)
3 cat ~/.ssh/id_rsa.pub(linux)
4 添加公钥到git中