gitlab 升级到5.0的严重注意事项 我这里只讨论从4.2到5.0升级过程,并且用的是Nginx和启用HTTPS配置。
第一,使用正确的版本的gitlab-shell
参考升级文档https:-//github.-com/gitlabhq/gitlabhq/wiki/From-4.2-to-5.0
注意其中第二步,git clone gitlab-shell之后要立刻让gitlab-shell切换到v1.1.0 tag.
先查看一下有几个tag
[plain] view plaincopyprint? 01.root@ubuntu1204-dell:/home/git/gitlab-shell# git tag 02.v1.0.3 03.v1.1.0 04.v1.2.0 root@ubuntu1204-dell:/home/git/gitlab-shell# git tag v1.0.3 v1.1.0 v1.2.0
然后查找v1.1.0的commit id论文网
[plain] view plaincopyprint? 01.git log --oneline --decorate 02.e8d93d0 (HEAD, tag: v1.1.0, master) up to 1.1.0 git log --oneline --decorate e8d93d0 (HEAD, tag: v1.1.0, master) up to 1.1.0
然后用reset命令切到这个tag
[plain] view plaincopyprint? 01.git reset --hard e8d93d0 git reset --hard e8d93d0 第二步,修改gitlab-shell中的配置文件
[plain] view plaincopyprint? 01.# Url to gitlab instance. Used for api calls 02.gitlab_url: "# Url to gitlab instance. Used for api calls gitlab_url: "
这里要用https, 注意最后/结尾
第三步,让gitlab-shell访问本地gitlab server的REST API时禁止启用SSL证书 [plain] view plaincopyprint? 01.so i had to add string not to check certificate at /home/git/gitlab-shell/lib/gitlab_net.rb 02.from: 03. 04.http = Net::HTTP.new(url.host, url.port) 05.http.use_ssl = (url.port == 443) 06.request = Net::HTTP::Get.new(url.request_uri) 07.http.start {|http| http.request(request) } 08.to: 09 [1] [2] [3] [4] 下一页
|