歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> GitLab 觀察項目files時500錯誤

GitLab 觀察項目files時500錯誤

日期:2017/2/28 14:54:11   编辑:Linux教程

剛將GitLab從3.0升級到4.0,很多項目導入進來。打開項目的files頁面,出現500 錯誤。

進入服務器,觀察日志:/home/gitlab/gitlab/log/production.log 文件中找到錯誤:

Started GET "/cloudengine/package/tree/master" for 127.0.0.1 at 2013-01-07 10:41:04 +0800
Processing by TreeController#show as HTML
Parameters: {"project_id"=>"cloudengine/package", "id"=>"master"}
Rendered shared/_ref_switcher.html.haml (2.7ms)
Rendered shared/_clone_panel.html.haml (0.9ms)
Rendered tree/_head.html.haml (5.5ms)
Rendered tree/_tree_item.html.haml (4.1ms)
Rendered tree/_tree.html.haml (6.9ms)
Rendered tree/show.html.haml within layouts/project_resource (13.2ms)
Completed 500 Internal Server Error in 54ms

ActionView::Template::Error (Permission denied - (/home/gitlab/gitlab/tmp/cache/assets/sprockets%2F31f4736e6c39e984d230e798c530da2020130107-1340-1xps2q7, /home/gitlab/gitlab/tm\
p/cache/assets/CB6/C90/sprockets%2F31f4736e6c39e984d230e798c530da20)):
1: %tr{ class: "tree-item #{tree_hex_class(tree_item)}" }
2: %td.tree-item-file-name
3: = tree_icon(type)
4: %strong= link_to truncate(tree_item.name, length: 40), project_tree_path(@project, tree_join(@id || @commit.id, tree_item.name))
5: %td.tree_time_ago.cgray
6: %span.log_loading.hide
app/helpers/tree_helper.rb:33:in `tree_icon'
app/views/tree/_tree_item.html.haml:3:in `_app_views_tree__tree_item_html_haml___1248346142396777318_33157860'
app/helpers/tree_helper.rb:21:in `block in render_tree'
app/helpers/tree_helper.rb:15:in `each'
app/helpers/tree_helper.rb:15:in `render_tree'
app/views/tree/_tree.html.haml:34:in `_app_views_tree__tree_html_haml___1664153310566467946_59134580'
app/views/tree/show.html.haml:3:in `_app_views_tree_show_html_haml__592423701844535987_55745220'
app/controllers/tree_controller.rb:17:in `show'

說什麼權限問題。暴力解決法:切到root下,然後修改tmp目錄權限。

chmod -R 777 ./tmp

重新啟動,一切OK。

GitLab 的詳細介紹:請點這裡
GitLab 的下載地址:請點這裡

Copyright © Linux教程網 All Rights Reserved