gitlab ce 中删除空项目之后,没有删除掉,访问500

在VirtualBox中的gitlab ce,在管理页面的操作如下:

  1. 新建一个仓库名为test的仓库,并从gitlab中导入
  2. 导入失败,使用root用户登录,在 Admin Area -> Projects-> Destroy test 仓库, Result:the test project Remove success
  3. 创建新的仓库名为test的空仓库
  4. 使用root用户登录后台,操作顺序是: Admin Area -> Projects -> Destroy test仓库,提示 "test Project will be remove",在Proejcts列表中还有test仓库在,心想可能是缓存的问题,过了1个半小时之后,Porjects列表还有这个仓库,访问这个仓库之后显示 gitlab 500 页面

在终端中输入gitlab-ctl tail命令,再次访问这个出现500错误的仓库,终端中会输出访问日志,错误提示的一部分如下:

Completed 500 Internal Server Error in 13392ms (ActiveRecord: 315.4ms)

ActionView::Template::Error (no repository for such path):
    2:   %legend
    3:     Builds:
    4: 
    5:   - unless @repository.gitlab_ci_yml
    6:     .form-group
    7:       .col-sm-offset-2.col-sm-10
    8:         %p Builds need to be configured before you can begin using Continuous Integration.
  app/models/repository.rb:59:in `block in empty?'
  lib/repository_cache.rb:19:in `fetch'
  app/models/repository.rb:59:in `empty?'
  app/models/repository.rb:471:in `gitlab_ci_yml'
  app/views/projects/_builds_settings.html.haml:5:in `_app_views_projects__builds_settings_html_haml___4011986669048903767_65005780'
  app/views/projects/edit.html.haml:87:in `block in _app_views_projects_edit_html_haml__1774897508436146680_63302900'
  app/views/projects/edit.html.haml:8:in `_app_views_projects_edit_html_haml__1774897508436146680_63302900'
  app/controllers/projects_controller.rb:24:in `edit'
  lib/gitlab/middleware/go.rb:16:in `call'

在Google了gitlab no repository for such path之后,在gitlab的issue找到Project deleted and recreated resulting in 500 error,尝试运行

sudo gitlab-rake cache:clear

命令之后,再访问Projects,删除的项目已经删除了。


maintenance翻译:
如果由于一些原因导致控制台(gitlab首页)显示错误信息,你可能想清除Redis的缓存
对于通过安装包安装:

sudo gitlab-rake cache:clear

对于通过源码安装:

cd /home/git/gitlab
sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production

参考文献:

  1. Page shows 500 Whoops, something went wrong on our end learn how to view the gitlab log at terminal by command
  2. Project deleted and recreated resulting in 500 error i try the command,it's work for me,Thank you!

转载于:https://www.cnblogs.com/fsong/p/5944211.html

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值