Gitlab打开Project报404解决

问题描述

使用拥有者账号打开Project

1
404 The page could not be found or you don't have permission to view it.

使用root账号打开Project

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Started GET "/Android/ContactsSync/edit" for 115.238.84.211 at 2018-06-13 13:29:02 +0800
Processing by ProjectsController#edit as HTML
Parameters: {"namespace_id"=>"Android", "id"=>"ContactsSync"}
Completed 500 Internal Server Error in 258ms (ActiveRecord: 11.5ms)

ActionView::Template::Error (No route matches {:action=>"show", :controller=>"projects/find_file", :id=>nil, :namespace_id=>#<Group id:3 @Android>, :project_id=>#<Project id:1 Android/ContactsSync>} missing required keys: [:id]):
1: !!! 5
2: %html{ lang: I18n.locale, class: page_class }
3: = render "layouts/head"
4: %body{ class: "#{user_application_theme} #{@body_class}", data: { page: body_data_page, project: "#{@project.path if @project}", group: "#{@group.path if @group}", find_file: find_file_path } }
5: = render "layouts/init_auto_complete" if @gfm_form
6: = render 'peek/bar'
7: = render "layouts/header/default"
config/application.rb:194:in `block (4 levels) in <class:Application>'
app/helpers/projects_helper.rb:478:in `find_file_path'
app/views/layouts/application.html.haml:4:in `_app_views_layouts_application_html_haml___4539331734934816470_47343684667880'
app/views/layouts/project.html.haml:14:in `_app_views_layouts_project_html_haml__3304991172716465960_47343690913300'
app/views/layouts/project_settings.html.haml:4:in `_app_views_layouts_project_settings_html_haml___2717813663302795480_47343563703380'
app/controllers/projects_controller.rb:34:in `edit'
lib/gitlab/i18n.rb:50:in `with_locale'
lib/gitlab/i18n.rb:56:in `with_user_locale'
app/controllers/application_controller.rb:360:in `set_locale'
lib/gitlab/middleware/multipart.rb:95:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only/controller.rb:28:in `call'
lib/gitlab/middleware/read_only.rb:16:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
lib/gitlab/middleware/release_env.rb:10:in `call'

解决方法

解决:清缓存

1
# sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :