我正在配置 redmine 从关联的 git 存储库中提取提交历史记录。我已经设置了一个本地镜像。我在项目设置>>存储库选项卡中定义了镜像的路径。但是当我浏览到项目的存储库选项卡时,我得到:
404
在存储库中找不到条目或修订。
生产日志显示:
Started GET "/projects/allsaints/repository" for 108.58.11.138 at 2013-03-24 17:51:27 -0400
Processing by RepositoriesController#show as HTML
Parameters: {"id"=>"allsaints"}
[1m[35m (0.1ms)[0m SELECT MAX(`settings`.`updated_on`) AS max_id FROM `settings`
[1m[36mUser Load (0.1ms)[0m [1mSELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`id` = 1 AND (users.status = 1) LIMIT 1[0m
Current user: Shawn (id=1)
[1m[35mProject Load (0.1ms)[0m SELECT `projects`.* FROM `projects` WHERE `projects`.`identifier` = 'allsaints' LIMIT 1
[1m[36mRepository Load (0.1ms)[0m [1mSELECT `repositories`.* FROM `repositories` WHERE `repositories`.`project_id` = 3 AND (is_default = 1) LIMIT 1[0m
Shelling out: '/usr/local/git/bin/git' '--git-dir' '/Library/WebServer/Sites/redmine2/extra/repositories/allsaints.git/' '-c' 'core.quotepath=false' '-c' 'log.decorate=no' 'log' '--no-color' '--encoding=UTF-8' '--date=iso' '--pretty=fuller' '--no-merges' '-n' '1'
[1m[35m (0.2ms)[0m BEGIN
[1m[36m (0.7ms)[0m [1mUPDATE `repositories` SET `root_url` = '/Library/WebServer/Sites/redmine2/extra/repositories/allsaints.git/', `extra_info` = '---\nextra_report_last_commit: \'0\'\n' WHERE `repositories`.`type` IN ('Repository::Git') AND `repositories`.`id` = 21[0m
[1m[35m (0.1ms)[0m COMMIT
Shelling out: '/usr/local/git/bin/git' '--git-dir' '/Library/WebServer/Sites/redmine2/extra/repositories/allsaints.git/' '-c' 'core.quotepath=false' '-c' 'log.decorate=no' 'branch' '--no-color' '--verbose' '--no-abbrev'
[1m[36mEnabledModule Load (0.2ms)[0m [1mSELECT name FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 3[0m
Shelling out: '/usr/local/git/bin/git' '--git-dir' '/Library/WebServer/Sites/redmine2/extra/repositories/allsaints.git/' '-c' 'core.quotepath=false' '-c' 'log.decorate=no' 'ls-tree' '-l' 'HEAD:'
Rendered common/error.html.erb within layouts/base (0.3ms)
[1m[35mUserPreference Load (0.2ms)[0m SELECT `user_preferences`.* FROM `user_preferences` WHERE `user_preferences`.`user_id` = 1 LIMIT 1
[1m[36mSQL (0.4ms)[0m [1mSELECT `members`.`id` AS t0_r0, `members`.`user_id` AS t0_r1, `members`.`project_id` AS t0_r2, `members`.`created_on` AS t0_r3, `members`.`mail_notification` AS t0_r4, `projects`.`id` AS t1_r0, `projects`.`name` AS t1_r1, `projects`.`description` AS t1_r2, `projects`.`homepage` AS t1_r3, `projects`.`is_public` AS t1_r4, `projects`.`parent_id` AS t1_r5, `projects`.`created_on` AS t1_r6, `projects`.`updated_on` AS t1_r7, `projects`.`identifier` AS t1_r8, `projects`.`status` AS t1_r9, `projects`.`lft` AS t1_r10, `projects`.`rgt` AS t1_r11, `roles`.`id` AS t2_r0, `roles`.`name` AS t2_r1, `roles`.`position` AS t2_r2, `roles`.`assignable` AS t2_r3, `roles`.`builtin` AS t2_r4, `roles`.`permissions` AS t2_r5, `roles`.`issues_visibility` AS t2_r6 FROM `members` LEFT OUTER JOIN `projects` ON `projects`.`id` = `members`.`project_id` LEFT OUTER JOIN `member_roles` ON `member_roles`.`member_id` = `members`.`id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `member_roles`.`role_id` WHERE `members`.`user_id` = 1 AND (projects.status<>9) ORDER BY projects.name[0m
[1m[35m (0.2ms)[0m SELECT COUNT(DISTINCT `versions`.`id`) FROM `versions` LEFT OUTER JOIN `projects` ON `projects`.`id` = `versions`.`project_id` WHERE (projects.id = 3 OR (projects.status <> 9 AND ( versions.sharing = 'system' OR (projects.lft >= 1 AND projects.rgt <= 2 AND versions.sharing = 'tree') OR (projects.lft < 1 AND projects.rgt > 2 AND versions.sharing IN ('hierarchy', 'descendants')) OR (projects.lft > 1 AND projects.rgt < 2 AND versions.sharing = 'hierarchy'))))
[1m[36mWiki Load (0.1ms)[0m [1mSELECT `wikis`.* FROM `wikis` WHERE `wikis`.`project_id` = 3 LIMIT 1[0m
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM `boards` WHERE `boards`.`project_id` = 3
Completed 404 Not Found in 108ms (Views: 40.1ms | ActiveRecord: 2.7ms)
我的理解是,可以通过检查 production.log 的所有者来验证正在运行的用户 redmine。取出这些 Shelling out: 条目中的任何一个,剥离单引号并运行生成的命令,因为该用户会产生正确的输出。
那么为什么会出现 404 错误呢?