1、系统必须是6.0以上。
2、gitlab中的配置。
a、需注意的是gitlab.yml,注意https和非https的区别
b、unicorn.rb中的listen "127.0.0.1:8080", :tcp_nopush => true。
c、application.rb中的一些细的配置。
d、database.yml中用host配置远程服务器。当然远程服务器的端口需开启。
请注意执行数据库初始化命令:sudo -u git -H bundleexec rake gitlab:setup RAILS_ENV=production
3、gitlab-shell的安装配置。
a、sudo -u git -H bundle exec rake gitlab:shell:install[v1.9.6] REDIS_URL=redis://localhost:6379 RAILS_ENV=production
b、注意 SELinux ,setenforce 0
c、接下来执行restorecon -Rv /home/git/.ssh
d、配置config.yml ,注意gitlab_url必须是你所公开访问gitlab的地址。
e、最好需执行sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production,来检查ssh不能正确登录问题。
4、注意查看gitlab/log 以及gitlab-shell/gitlab-shell.log发现问题。
5、更改配置,可能需执行service gitlab restart 和service httpd restart
6、使用sourcetree。需使用翻墙软件下载并注册。并且在工具->选项->一般,ssh客户端选择openSSH。选择RSA秘钥。
7、ssh客户端检查:ssh -vv git@你的服务器 。
8、当发现welcome to gitlab, anonymous!不要高兴的太早,很有可能是你的gitlab-shell没有正确安装和配置。
9、当然如果你只能使用git@xxxx.com:/home/git/repositories/name/projectname.gt时,很有可能也是你的gitlab-shell没有被正确安装和配置。
10、当你不能各种push时,很有可能又是你的gitlab-shell没有被正确安装和配置。
11、注意:ruby务必要2.1版本,否则就会有各种group,project等删除或浏览错误。