标签:gitlab搭建 以及gitolite迁移到 gitlab
环境Ubuntu 12.04
If you install Postfix to send email please select ‘Internet Site‘ during setup. Instead of using Postfix you can also use Sendmail orconfigure a custom SMTP server. If you wish to use Exim, please configure it as an SMTP server.
On Centos 6 and 7, the commands below will also open HTTP and SSH access in the system firewall.
sudo apt-get install curl openssh-server ca-certificates postfix
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash sudo apt-get install gitlab-ce
If you are not comfortable installing the repository through a piped script, you can find the entire script here.
sudo gitlab-ctl reconfigure
Username: root Password: 5iveL!fe
到此可以使用root账户登录,新建项目。
下面配置一下邮件:
gitlab_rails[‘gitlab_email_from‘] = ‘j@example.com‘ gitlab_rails[‘smtp_enable‘] = true gitlab_rails[‘smtp_address‘] = "smtp.exmail.qq.com" gitlab_rails[‘smtp_port‘] = 456 gitlab_rails[‘smtp_user_name‘] = "j@example.com" gitlab_rails[‘smtp_password‘] = "password" gitlab_rails[‘smtp_domain‘] = "smtp.qq.com" gitlab_rails[‘smtp_authentication‘] = "login" gitlab_rails[‘smtp_enable_starttls_auto‘] = true
配置完邮件以后就可以注册用户了。
如果想要把之前使用的gitolite的项目导入到gitlab使用以下方式(注意:之前的仓库是没有.git后缀的,但是gitlab是有.git后缀的,我们要手动把仓库名字改成带.git的格式)
cp /tmp/repositories/* /var/opt/gitlab/git-data/repositories/root/* cd /var/opt/gitlab/git-data/repositories/root/ mv example example.git chown -R git:git /var/opt/gitlab/git-data/repositories/root/* #执行以下命令导入 gitlab-rake gitlab:import:repos
出现如下图说明导入完成,登录gitlab去查看吧。
Processing hortor/goose_client.git
* Created goose_client (hortor/goose_client.git)
Done!
标签:gitlab搭建 以及gitolite迁移到 gitlab
原文地址:http://crazyjjx.blog.51cto.com/2746212/1670323