2015-11-26 33 views
1

我從源代碼安裝了gitlab 8.2.0,並按照https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation的說明操作。gitlab 8.2.0 git不工作

當我與

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production 

我碰到下面的錯誤運行檢查:

Running /home/git/gitlab-shell/bin/check 
Check GitLab API access: FAILED. code: 301 
gitlab-shell self-check failed 
Try fixing it: 
    Make sure GitLab is running; 
    Check the gitlab-shell configuration file: 
    sudo -u git -H editor /home/git/gitlab-shell/config.yml 
    Please fix the error above and rerun the checks. 

Checking GitLab Shell ... Finished 

這裏是的/ home/git的/ gitlab殼我config.yml文件:

user: git 
gitlab_url: "http://www.example.com/gitlab" 
http_settings: 
    #ca_path: /etc/ssl/certs 
    self_signed_cert: true 
repos_path: "/home/git/repositories/" 
auth_file: "/home/git/.ssh/authorized_keys" 
redis: 
    bin: "/usr/bin/redis-cli" 
    namespace: resque:gitlab 
    socket: "/var/run/redis/redis.sock" 
log_level: INFO 
audit_usernames: false 

請注意,我使用相對URL功能在www.example.com/gitlab上運行gitlab。此外,服務器位於反向代理的後面,該代理終止https到http,如果這應該與此問題有任何相關性。

我也不能'推或拉任何存儲庫。當我嘗試我得到以下錯誤:

git pull https://www.example.com/gitlab/test/testproject.git 
Username for 'https://www.example.com': test 
Password for 'https://[email protected]': 
fatal: Couldn't find remote ref HEAD 
Unexpected end of command stream 

我也不能通過webUI向任何項目添加任何文件。如果我嘗試這樣做,我得到以下錯誤

Commit was rejected by pre-receive hook 

從production.log的日誌,這看起來如下:

Sarted POST "/gitlab/test/testprojekt/create/master" for 147.86.8.115 at    2015-11-26 15:24:43 +0100 
Processing by Projects::BlobController#create as JSON 
Parameters: {"new_branch"=>"master", "create_merge_request"=>"1", "commit_message"=>"test", "file"=># <ActionDispatch::Http::UploadedFile:0x007f776230faf8 @tempfile=# <Tempfile:/tmp/RackMultipart20151126-7584-308za1>, @original_filename="test2.txt", @content_type="text/plain", @headers="Content- Disposition: form-data; name=\"file\"; filename=\"test2.txt\"\r\nContent-Type: text/plain\r\n">, "namespace_id"=>"test", "project_id"=>"testprojekt", "id"=>"master"} 
Completed 200 OK in 628ms (Views: 0.3ms | ActiveRecord: 3.3ms) 
Started GET "/gitlab/test/testprojekt/new/master" for 147.86.8.115 at 2015-11-26 15:24:44 +0100 
Processing by Projects::BlobController#new as HTML 
Parameters: {"namespace_id"=>"test", "project_id"=>"testprojekt", "id"=>"master"} 
Completed 200 OK in 85ms (Views: 49.6ms | ActiveRecord: 6.0ms) 

回答

0

我想你可以嘗試切換gitlab_url: "http://www.example.com/gitlab"到https - >gitlab_url: "https://www.example.com/gitlab"

不知道它是一個完整的修復,但它的推薦。

編輯: config.yml 4號線應該像

ca_path: "/etc/ssl/certs" 
+0

謝謝您的回答,但這不幸的是沒有解決我的問題。 – Shazral

+0

好吧,我仍然會保持HTTPS,當我多花一點時間時,我會再次看到它。 –