git实验室未执行来自 git 的 git 命令
gitlab not executing git command from git
我已经在本地 ubuntu 服务器 16.04 和 apache2 (2.4) 上成功安装了 GitLab Community Edition 8.15.2 (omnibus),我可以在浏览器中访问它并执行所有任务。但是当我尝试使用 git bash 或 git gui 执行任务(比如第一次推送项目或克隆项目)时,它不执行任务,例如
git clone http://192.168.179.128/pherry/Pilzon.git
它给出了以下输出
Cloning into 'Pilzon'...
fatal: unable to access 'http://192.168.179.128/pherry/Pilzon.git/': The requested URL returned error: 500
所以当我执行以下行
时,我查看了 production.log 文件
git clone http://192.168.179.128/pherry/Pilzon.git
这是日志
Started GET "/pherry/Pilzon.git/info/refs?service=git-upload-pack" for 192.168.179.1 at 2017-01-09 20:00:17 -0800
Processing by Projects::GitHttpController#info_refs as */*
Parameters: {"service"=>"git-upload-pack", "namespace_id"=>"pherry", "project_id"=>"Pilzon.git"}
Filter chain halted as :authenticate_user rendered or redirected
Completed 401 Unauthorized in 41ms (Views: 0.3ms | ActiveRecord: 5.2ms)
Started GET "/" for 192.168.179.1 at 2017-01-09 20:00:19 -0800
Started GET "/" for 192.168.179.1 at 2017-01-09 20:00:19 -0800
Processing by RootController#index as HTML
Processing by RootController#index as HTML
Completed 401 Unauthorized in 44ms (ActiveRecord: 19.3ms)
Completed 401 Unauthorized in 28ms (ActiveRecord: 4.3ms)
然后它要求输入密码,当我提供密码时,这就是日志
Started GET "/pherry/Pilzon.git/info/refs?service=git-upload-pack" for 192.168.179.1 at 2017-01-09 20:01:52 -0800
Processing by Projects::GitHttpController#info_refs as */*
Parameters: {"service"=>"git-upload-pack", "namespace_id"=>"pherry", "project_id"=>"Pilzon.git"}
Filter chain halted as :authenticate_user rendered or redirected
Completed 401 Unauthorized in 32ms (Views: 0.6ms | ActiveRecord: 3.5ms)
Started GET "/pherry/Pilzon.git/info/refs?service=git-upload-pack" for 192.168.179.1 at 2017-01-09 20:01:52 -0800
Processing by Projects::GitHttpController#info_refs as */*
Parameters: {"service"=>"git-upload-pack", "namespace_id"=>"pherry", "project_id"=>"Pilzon.git"}
Completed 500 Internal Server Error in 149ms (ActiveRecord: 5.6ms)
JWT::DecodeError (Nil JSON web token):
lib/gitlab/workhorse.rb:137:in `decode_jwt'
lib/gitlab/workhorse.rb:133:in `verify_api_request!'
app/controllers/concerns/workhorse_request.rb:11:in `verify_workhorse_api!'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:15:in `call'
lib/gitlab/middleware/go.rb:16:in `call'
我找了一天解决方案,还没找到。
您对 22532 也有类似的问题,暗示升级后 gitlab-workhorse
版本不匹配..
Issue 23133 also mention the JWT::DecodeError (Nil JSON web token)
error message and points to gitlab-recipes
issue 57,可能的修正:
Short answer, need to change /etc/init.d/gitlab
so gitlab-workhorse
listens on a TCP port rather than using unix sockets, then set up an Apache rewrite to that port.
(查看更多at this comment)
我已经在本地 ubuntu 服务器 16.04 和 apache2 (2.4) 上成功安装了 GitLab Community Edition 8.15.2 (omnibus),我可以在浏览器中访问它并执行所有任务。但是当我尝试使用 git bash 或 git gui 执行任务(比如第一次推送项目或克隆项目)时,它不执行任务,例如
git clone http://192.168.179.128/pherry/Pilzon.git
它给出了以下输出
Cloning into 'Pilzon'...
fatal: unable to access 'http://192.168.179.128/pherry/Pilzon.git/': The requested URL returned error: 500
所以当我执行以下行
时,我查看了 production.log 文件git clone http://192.168.179.128/pherry/Pilzon.git
这是日志
Started GET "/pherry/Pilzon.git/info/refs?service=git-upload-pack" for 192.168.179.1 at 2017-01-09 20:00:17 -0800
Processing by Projects::GitHttpController#info_refs as */*
Parameters: {"service"=>"git-upload-pack", "namespace_id"=>"pherry", "project_id"=>"Pilzon.git"}
Filter chain halted as :authenticate_user rendered or redirected
Completed 401 Unauthorized in 41ms (Views: 0.3ms | ActiveRecord: 5.2ms)
Started GET "/" for 192.168.179.1 at 2017-01-09 20:00:19 -0800
Started GET "/" for 192.168.179.1 at 2017-01-09 20:00:19 -0800
Processing by RootController#index as HTML
Processing by RootController#index as HTML
Completed 401 Unauthorized in 44ms (ActiveRecord: 19.3ms)
Completed 401 Unauthorized in 28ms (ActiveRecord: 4.3ms)
然后它要求输入密码,当我提供密码时,这就是日志
Started GET "/pherry/Pilzon.git/info/refs?service=git-upload-pack" for 192.168.179.1 at 2017-01-09 20:01:52 -0800
Processing by Projects::GitHttpController#info_refs as */*
Parameters: {"service"=>"git-upload-pack", "namespace_id"=>"pherry", "project_id"=>"Pilzon.git"}
Filter chain halted as :authenticate_user rendered or redirected
Completed 401 Unauthorized in 32ms (Views: 0.6ms | ActiveRecord: 3.5ms)
Started GET "/pherry/Pilzon.git/info/refs?service=git-upload-pack" for 192.168.179.1 at 2017-01-09 20:01:52 -0800
Processing by Projects::GitHttpController#info_refs as */*
Parameters: {"service"=>"git-upload-pack", "namespace_id"=>"pherry", "project_id"=>"Pilzon.git"}
Completed 500 Internal Server Error in 149ms (ActiveRecord: 5.6ms)
JWT::DecodeError (Nil JSON web token):
lib/gitlab/workhorse.rb:137:in `decode_jwt'
lib/gitlab/workhorse.rb:133:in `verify_api_request!'
app/controllers/concerns/workhorse_request.rb:11:in `verify_workhorse_api!'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:15:in `call'
lib/gitlab/middleware/go.rb:16:in `call'
我找了一天解决方案,还没找到。
您对 22532 也有类似的问题,暗示升级后 gitlab-workhorse
版本不匹配..
Issue 23133 also mention the JWT::DecodeError (Nil JSON web token)
error message and points to gitlab-recipes
issue 57,可能的修正:
Short answer, need to change
/etc/init.d/gitlab
sogitlab-workhorse
listens on a TCP port rather than using unix sockets, then set up an Apache rewrite to that port.
(查看更多at this comment)