Gitlab - 从项目中单击“分支”返回404

时间:2013-10-31 21:36:54

标签: gitlab

我在管理GitLab方面相对较新,我继承了大约十几个托管git repos的实例。我听到抱怨点击一个项目中的“分支”会抛出404.看起来它会在production.log中抛出500。但它仅限于某些项目。其他项目表现良好,但我无法找到一个模式,说明为什么它发生在某些项目而不是其他项目上。据我所知,我们在名称中没有带“#”的分支或两个“/".

来自nginx访问日志:

129.46.71.24 - - [31/Oct/2013:14:18:49 -0700] "GET /thirdparty/llvm-static-
artifacts/branches HTTP/1.1" 404 249 "https://gitlab.someurl.com/thirdparty/llvm-
static-artifacts/branches" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/30.0.1599.114 Safari/537.36"

129.46.71.24 - - [31/Oct/2013:14:18:49 -0700] "GET /thirdparty/llvm-static-
artifacts/branches HTTP/1.1" 404 249 "https://gitlab.someurl.com/thirdparty/llvm-
static-artifacts/branches" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, 
like Gecko) Chrome/30.0.1599.114 Safari/537.36"

来自production.log:

Started GET "/thirdparty/llvm-static-artifacts/branches" for 127.0.0.1 at 2013-10-31 
14:19:58 -0700
Processing by Projects::BranchesController#index as HTML
  Parameters: {"project_id"=>"thirdparty/llvm-static-artifacts"}
  Rendered shared/_ref_switcher.html.haml (1.8ms)
  Rendered projects/commits/_head.html.haml (4.5ms)
  Rendered projects/branches/_filter.html.haml (1.6ms)
  Rendered projects/branches/_branch.html.haml (4.3ms)
  Rendered projects/branches/_branch.html.haml (2.3ms)
  Rendered projects/branches/index.html.haml within layouts/projects (13.5ms)
Completed 500 Internal Server Error in 85ms

ActionController::RoutingError (No route matches {:action=>"destroy",   
:controller=>"projects/branches", :project_id=>#<Project id: 107, name:    
"llvm.static.artifacts", path: "llvm-static-artifacts", description: "", created_at: 
"2013-09-23 21:15:36", updated_at: "2013-10-07 21:56:28", creator_id: 7, default_branch: 
"feature/NEO-10669_clang_and_static_libcxx", issues_enabled: true, wall_enabled: false, 
merge_requests_enabled: true, wiki_enabled: true, namespace_id: 18, public: false, 
issues_tracker: "gitlab", issues_tracker_id: nil, snippets_enabled: false, 
last_activity_at: "2013-10-07 21:56:30", imported: false, import_url: "">, 
:id=>"feature/NEO-5388_update_nst_to_compile_with_llvm/clang32"}):
  app/views/projects/branches/_branch.html.haml:17:in  
`_app_views_projects_branches__branch_html_haml___758623504167079734_70006805062880'

  app/views/projects/branches/index.html.haml:9:in `block in 
_app_views_projects_branches_index_html_haml___1230313324773652987_70006835956360'
  app/views/projects/branches/index.html.haml:8:in `each'
  app/views/projects/branches/index.html.haml:8:in  
`_app_views_projects_branches_index_html_haml___1230313324773652987_70006835956360'


Started GET "/thirdparty/llvm-static-artifacts/branches" for 127.0.0.1 at 2013-10-31  
14:19:58 -0700
Processing by Projects::BranchesController#index as HTML
  Parameters: {"project_id"=>"thirdparty/llvm-static-artifacts"}
  Rendered shared/_ref_switcher.html.haml (1.8ms)
  Rendered projects/commits/_head.html.haml (4.4ms)
  Rendered projects/branches/_filter.html.haml (1.6ms)
  Rendered projects/branches/_branch.html.haml (4.2ms)
  Rendered projects/branches/_branch.html.haml (2.3ms)
  Rendered projects/branches/index.html.haml within layouts/projects (13.4ms)
Completed 500 Internal Server Error in 84ms

ActionController::RoutingError (No route matches {:action=>"destroy",  
:controller=>"projects/branches", :project_id=>#<Project id: 107, name:  
"llvm.static.artifacts", path: "llvm-static-artifacts", description: "", created_at:  
"2013-09-23 21:15:36", updated_at: "2013-10-07 21:56:28", creator_id: 7, default_branch: 
"feature/NEO-10669_clang_and_static_libcxx", issues_enabled: true, wall_enabled: false,  
merge_requests_enabled: true, wiki_enabled: true, namespace_id: 18, public: false, 
issues_tracker: "gitlab", issues_tracker_id: nil, snippets_enabled: false, 
last_activity_at: "2013-10-07 21:56:30", imported: false, import_url: "">, 
:id=>"feature/NEO-5388_update_nst_to_compile_with_llvm/clang32"}):
  app/views/projects/branches/_branch.html.haml:17:in  
`_app_views_projects_branches__branch_html_haml___758623504167079734_70006805062880'
  app/views/projects/branches/index.html.haml:9:in `block in   
_app_views_projects_branches_index_html_haml___1230313324773652987_70006835206340'
  app/views/projects/branches/index.html.haml:8:in `each'
  app/views/projects/branches/index.html.haml:8:in  
`_app_views_projects_branches_index_html_haml___1230313324773652987_70006835206340'

以下是我们正在运行的内容:

$ cat VERSION 
6.0.0-ee

$ git branch
  6-0-stable
* master

$ git status
# On branch master
# Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
#   (use "git pull" to update your local branch)
#
nothing to commit, working directory clean

我意识到它说我们落后于1次提交。更新是否只是做一个“git pull”然后重新启动nginx和gitlab一样简单?

提前致谢。我为新手gitlab体验道歉。

2 个答案:

答案 0 :(得分:2)

我刚从6.0.0-ee升级到6.2.0-ee,使用了非常详细的说明:https://github.com/gitlabhq/gitlabhq/blob/master/doc/update/6.0-to-6.2.md

它变得非常顺利。但现在正在退回404的项目现在返回一个分支列表。

答案 1 :(得分:0)

请你运行:sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

告诉我你是否看到任何红色支票?