gitlab not executing git command from git

706 views Asked by At

I have successfully installed GitLab Community Edition 8.15.2 (omnibus) on my local ubuntu server 16.04 with apache2 (2.4), i can access it in browser and can perform all tasks. But when i try to execute task (like pushing project for first time or cloning project) using git bash or git gui, it does not perform the task e.g.

git clone http://192.168.179.128/pherry/Pilzon.git

it gave following output

Cloning into 'Pilzon'...
fatal: unable to access 'http://192.168.179.128/pherry/Pilzon.git/': The requested URL returned error: 500

So i looked into production.log file when i executed the following line

git clone http://192.168.179.128/pherry/Pilzon.git

and this was the log

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)

then it asked for password and when i provided it and this was the log

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'

i have been searching for solution for a day and have not found it yet.

1

There are 1 answers

1
VonC On BEST ANSWER

You have a similar issue with 22532, alluding to a gitlab-workhorse mismatch version after an upgrade..

Issue 23133 also mention the JWT::DecodeError (Nil JSON web token) error message and points to gitlab-recipes issue 57, with the possible fix:

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.

(see more at this comment)