使用源码安装的方式升级gitlib7.14到gitlab-8.13.5中文版,然后push的时候报错:

错误信息如下:

Started GET "/gitlab/hushizhi/gitlabcidemo.git/info/refs?service=git-receive-pack" for 10.1.5.121 at 2016-12-01 12:04:28 +0800
Processing by Projects::GitHttpController#info_refs as */*
Parameters: {"service"=>"git-receive-pack", "namespace_id"=>"hushizhi", "project_id"=>"gitlabcidemo.git"}
Completed 500 Internal Server Error in 263ms (ActiveRecord: 22.3ms)

JWT::DecodeError (Nil JSON web token):
lib/gitlab/workhorse.rb:120:in `verify_api_request!'
app/controllers/projects/git_http_client_controller.rb:154:in `verify_workhorse_api!'
lib/gitlab/request_profiler/middleware.rb:15:in `call'
lib/gitlab/middleware/go.rb:16:in `call'

参考stackoverflow上的这篇文章中的答案(stackoverflow中问问题的人用的是apache,我用的是nginx,不过错误的原因都是一样的):

问题出在反代的配置上:nginx或者apache的反代应该反代到 http://gitlab-workhorse; 而不应该反代到http://127.0.0.1:8080

修改过来之后,重启nginx或者apahche就可以push和clone了

 

posted on 2016-12-01 14:23  梦中彩虹  阅读(1882)  评论(1编辑  收藏  举报