GitLab 观察项目files时500错误


刚将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 的下载地址:请点这里

相关内容