Gitlab
1环境 阿里云centOS7.3
安装所需环境依赖组件
sudo yum install curl policycoreutils openssh-server openssh-clients
sudo systemctl enable sshd
sudo systemctl start sshd
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld
安装Gitlab包
curl -k https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
3配置文件
vi /etc/gitlab/gitlab.rb
(1)配置访问IP及端口或使用域名
13行
Gitlab-ctl restart
浏览器访问
gitlab 修改root用户密码
gitlab-rails console production
Gitlab 汉化
查看版本
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
克隆版本库
git clone https://gitlab.com/xhang/gitlab.git
比较汉化标签和原标签
安装git
yum -y install git
在需要的地方创建一个仓库
git init --bare learngit.git
创建一个Git用户
useradd Git
修改密码
passwd git
赋予用户权限
chown -R git:git learngit.git
禁用Git用户shell登录
创建ssh key
ssh-keygen -t rsa -C "了[email protected]"
服务器端 进入 /etc/ssh/sshd_config
1.RSAAuthentication yes
2.PubkeyAuthentication yes
3.AuthorizedKeysFile .ssh/authorized_keys