2017-01-10 169 views
1

我已經在我的本地ubuntu服務器16.04上使用apache2(2.4)成功安裝了GitLab Community Edition 8.15.2(omnibus),我可以在瀏覽器中訪問它並執行所有任務。但是,當我嘗試使用git bash或git gui執行任務(如第一次推送項目或克隆項目)時,它不執行任務,例如gitlab不執行Git的git命令

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' 

我一直在尋找解決方案的一天,但還沒有找到它。

回答

1

您也有類似的問題與22532,暗指升級後gitlab-workhorse錯配版本..

Issue 23133也不在話下JWT::DecodeError (Nil JSON web token)錯誤信息,並指出gitlab-recipes issue 57,與可能的解決辦法:

簡短的回答,需要更改/etc/init.d/gitlab,因此gitlab-workhorse在TCP端口上偵聽,而不是使用unix套接字,然後設置一個Apache重寫到該端口。

(見更多at this comment

+0

改變線gitlab_workhorse [ '的listen_addr'] = 「的/ var /選擇/ gitlab/gitlab-主力/插口」 到gitlab_workhorse [ '的listen_addr'] = 「本地主機:8282」 ,在/etc/gitlab/gitlab.rb中,安裝後已經安裝好了,現在每件事情都在運行。謝謝@VonC –