1.问题起因

办公网机房意外断掉,导致gitlab库文件损坏。开发打开gitlab显示500

2.查看日志

命令查看:gitlab-ctl tail

或者手动查看:/var/log/gitlab/gitlab-rails/production.log日志文件

gitlab Rugged::OdbError (Failed to inflate loose object.)

提示库文件损坏

3.处理方法

参考链接:

https://stackoverflow.com/questions/36546774/gitlab-repository-corrupted-showing-500-error-on-frontend

执行以下步骤后,库恢复正常

. # cd gitlab/repositories/<namespace>/<reponame>.git 

. # git fsck
If any error like below
error: object file objects//fbf0dfb1a54283e84044b5e99230efbafd77d8 is empty
error: object file objects//fbf0dfb1a54283e84044b5e99230efbafd77d8 is empty
fatal: loose object 11fbf0dfb1a54283e84044b5e99230efbafd77d8 (stored in objects//fbf0dfb1a54283e84044b5e99230efbafd77d8) is corrupt . # find . –size –delete
This will delete all files which has byte size and corrupt . # git fsck
Checking object directories: % (/), done.
Checking objects: % (/), done.
error: HEAD: not a commit
error: refs/heads/master: not a commit
dangling commit de516dd3d99d13147b6e2f946fe5b8c0660e4eed . Try to push code from local without add and commit
# git push origin <branch>
If got below error
remote: error: Could not read 5329f756010fad47026f112dc7126bdaa2f9ad7f
remote: fatal: Failed to traverse parents of commit 8eecd866caa916a3b2e8550153f0bb5a54a28919
remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header . Go to cd gitlab/repositories/<namespace>/<reponame>.git
# rm –fr ref/head/<branchname>
# git fsck
notice: HEAD points to an unborn branch (master)
Checking object directories: % (/), done.
notice: No default references
dangling commit eb84ebc9010ea3d3d5646b4eab1bacd358178fbd . Try to push code from local without add and commit
# git push origin <branch> Done your code updated successfully !!!

Gitlab库已损坏前端显示500错误解决方法的更多相关文章

  1. 【Linux】Gitlab库已损坏前端显示500错误解决方法

    背景: 在进行gitlab数据迁移之后,所有页面正常访问,唯独在访问项目repo地址时,报500错误 1 查看日志: 命令查看: gitlab-ctl tail 或者手动查看:/var/log/git ...

  2. WORDPRESS 后台500错误解决方法集合

    引自: http://www.guuglc.com/565.html 这篇文章本质上我是不可能会写到,就因为7号那天晚上,我准备搬家的时候,发现前台完好,进入后台却500错误. 这时我就得急的,毕竟明 ...

  3. Axure RP chrome插件显示已损坏或者无法安装的解决方法

    http://www.cnplugins.com/zhuanti/arux-rp-bug.html 1.Axure RP chrome插件无法安装的解决方法. 首先Axure RP chrome插件的 ...

  4. C#报Lc.exe已退出 代码为-1 错误解决方法

    解决方法一:用记事本打开*.licx,里面写的全是第三方插件的指定DLL,删除错误信息,保存,关闭,重新生成解决方案. 解决方法二:把项目文件夹下Properties文件夹下的licenses.lic ...

  5. IIS前端页面不显示详细错误解决方法

    要想解决这个问题,有三种方法可以考虑: 1.Internet信息服务(IIS)管理器 2.Web.config文件 3. 命令行 在IIS的"错误页"右边的"编辑功能设置 ...

  6. APACHE服务器500错误解决方法

    1.APACHE没开启rewrite模块. 解决办法:编辑apache的http.conf文件,找到#LoadModule rewrite_module modules/mod_rewrite.so, ...

  7. idea运行Tomcat的servlet程序时报500错误解决方法

    今天在测试使用Tomcat运行servlet小程序时,在传递参数时,出现了如上错误. 开始我以为是配置出了问题,就把项目删除了又建立了一遍,结果亦然. 经过仔细排查,发现问题,先说明问题原因:idea ...

  8. copy "xxxxx\xx.dll xxxxxxx\ ” 已退出,代码为1 错误解决方法

    右键=>属性=>生成事件里面,查看预先生成事件命令行和后期生成事件命令行,查看复制的Dll是否存在已经路径是否正确

  9. ASP 500错误解决方法

    最有效的解决方法: 经  c:\windows\temp 目录增加everyone写权限. 环境: windows2008

随机推荐

  1. 常用的css文件

    reset.css(几乎每个项目都要引入的css) @charset "utf-8";html{background-color:#fff;color:#000;font-size ...

  2. sublime 将打字内容放在屏幕中央

    在settings user里添加一句: "scroll_past_end": true

  3. Java记录-SpringMVC整合Echarts画地图加散点图

    1.搭建eclipse+JDK+Maven+SpringMVC+Spring+Mybatis后台架构,详细就不过多阐述了 2.下载百度eharts插件:http://echarts.baidu.com ...

  4. Code::Blocks代码自动提示设置及常用快捷键

    Code::Blocks代码自动提示设置及常用快捷键(适用windows和linux) 1)以下需要设置的地方均在Settings->Editor...弹出的对话框中. 2)不少命令都可针对当前 ...

  5. ZOJ 4019 Schrödinger's Knapsack

    Schrödinger's Knapsack Time Limit: 1 Second      Memory Limit: 65536 KB DreamGrid has a magical knap ...

  6. # 20155214 2016-2017-2 《Java程序设计》第8周学习总结

    20155214 2016-2017-2 <Java程序设计>第8周学习总结 教材学习内容总结 对于串流输入/输出使用inputStream/OutputStream来衔接数据源与目的地, ...

  7. MySQL之当数据库数据源被锁(Table Metadata Lock)时的解决方案

    0.发生的原因分析:[hibernate的线程池连接导致了不能修改被锁定数据库的数据库型模式] 1.关掉hibernate的所有线程池(选择退出IDE或者其他办法) 2.查看被锁的进程ID:show ...

  8. python技巧 switch case语句

    不同于C语言和SHELL,python中没有switch case语句,关于为什么没有,官方的解释是这样的 使用Python模拟实现的方法: def switch_if(fun, x, y):    ...

  9. tidb 架构 ~Tidb学习系列(3)

    tidb集群安装测试1 环境 3台机器2 配置   server1 pd服务+tidb-server   server2 tidb-kv   server3 tidb-kv3 环境配置命令   ser ...

  10. 【逆向工具】IDA使用4-控制台逆向分析 Reverse004.exe 获取密码

    工具 吾爱破解版本OD.IDA6.8 OD使用-动态分析 OD快捷方式 F2 下断点,也就是指定断点的地址F3加载一个可执行程序,进行调试分析F4程序执行到光标处 F5 缩小.还原当前窗口 F7 单步 ...