请参考:http://wiki.bitnami.com/Applications/BitNami_GitLab
[切记] IT很折腾,尽量使用测试可行的配套版本,尽量少升级,减少风险!
(1)不要用ubuntu 14.04版本,perl lib版本不匹配会搞死你;
(2)别用ubuntu desktop版本,性能跟不上;
(3)配置文件修改一定要先备份!
1. 修改http和ssh端口,上文写到了;
2. 在/home/git/gitlab-shell/config.yml中配置的gitlab_url为你使用的url;
3. 代码推送:需要配置SSH公钥
4. 配置用户、仓库;
5. 如何导入原来的GIT库和历史?
请在原来GIT的repositories中把所有的仓库都保存下来,然后替换到新的GIT中对应的仓库位置;
6. push失败怎么办?
如果使用ssh推送,请先添加用户的公钥,注意是用户的;
如果你用了步骤5,遇到写权限问题,请再做一次chown操作:
在repositories目录中,使用命令 chown -R git:git 仓库文件夹
如果用http推送半天没有错误提示也是一样的问题!!
7. 发邮件配置(SMTP):
(1)修改config/environments/production.rb ,比如我用的是qq企业邮箱:
config.action_mailer.delivery_method = :smtp (原来是sendmail)
config.action_mailer.smtp_settings = {
:address => “smtp.exmail.qq.com”,
:port => 25,
:domain => “qq.com”,
:authentication => :plain,
:user_name => “邮箱地址”,
:password => “密码”,
:enable_starttls_auto => false
}
(2)特别关键!我又忘记了!修改config/gitlab.yml
email_from: 邮箱地址
#protocol:http (千万别加)
8. 推送时http.rb错误解决方案:
如果客户端用ssh连接git出现如下错误:
在/etc/hosts中添加一个域名地址映射:
127.0.0.1 YOUR_DOMIN
# YOUR_DOMIN是在/home/git/gitlab-shell/config.yml中配置的域名;
9. 推送时:getaddrinfo: Temporary failure in name resolution (SocketError)
解决方式:DNS问题,请配置好DNS,可参考:http://wiki.neal365.com/?p=228