美文网首页
【Git学习】Gitlab创建项目的时候出现了错误 :Faile

【Git学习】Gitlab创建项目的时候出现了错误 :Faile

作者: 欧阳鹏 | 来源:发表于2018-12-06 19:50 被阅读97次

一、问题描述

下午有同事反馈,Gitlab上无法创建新的仓库了,提示如下:

在这里插入图片描述
The form contains the following error:
    Failed to create repository via gitlab-shell

让我看看是不是GitLab服务器出现了什么问题?

二、问题排查

猜测一、是不是那位同事的权限不够?

遇到这种情况,我先用root管理员的身份,帮他在ios这个Group下新建项目,但是也是报一样的错误,因此不是这个原因

猜测二、服务器出现了什么问题?得看看日志才行

2.2.1 查看日志

链接: http://xxxx.xxx.xxxx.xxxx/admin/logs (xxxx.xxx.xxxx.xxxx 为 gitlab的地址)

查看【Admin Area】-->【Monitoring】-->【Logs】-->【githost.log】

我用root管理员的身份,去查看了GitLab服务器的运行日志,如下所示:

在这里插入图片描述
October 20, 2018 09:44 -> INFO -> 'git -c repack.writeBitmaps=false repack -d' in /data/gitlabData/repositories/Android/WatchApp/Self/RedPacketOfIntegral.git

October 20, 2018 11:01 -> INFO -> 'git -c repack.writeBitmaps=false repack -d' in /data/gitlabData/repositories/Android/WatchApp/Z1/Launcher.git

October 20, 2018 11:04 -> INFO -> 'git -c repack.writeBitmaps=true repack -A -d --pack-kept-objects' in /data/gitlabData/repositories/iOS/EKOSDKSpecs.git

October 20, 2018 11:53 -> INFO -> 'git -c repack.writeBitmaps=false repack -d' in /data/gitlabData/repositories/iOS/EKOSDKSpecs.git

October 20, 2018 12:07 -> INFO -> 'git -c repack.writeBitmaps=false repack -d' in /data/gitlabData/repositories/Android/WatchApp/Self/Launcher.git

October 20, 2018 15:25 -> INFO -> 'git -c repack.writeBitmaps=true repack -A -d --pack-kept-objects' in /data/gitlabData/repositories/Android/PhoneApp/XTCWatch.git

October 20, 2018 15:25 -> ERROR -> 'git -c repack.writeBitmaps=true repack -A -d --pack-kept-objects' in /data/gitlabData/repositories/Android/PhoneApp/XTCWatch.git failed:

fatal: sha1 file 'objects/pack/tmp_pack_3VdpAL' write error: No space left on device

October 20, 2018 15:38 -> INFO -> 'git -c repack.writeBitmaps=true gc' in /data/gitlabData/repositories/iOS/CallWatch.git

October 20, 2018 15:39 -> ERROR -> 'git -c repack.writeBitmaps=true gc' in /data/gitlabData/repositories/iOS/CallWatch.git failed:

fatal: sha1 file 'objects/pack/tmp_pack_TUKcET' write error: No space left on device

error: failed to run repack

通过上面的日志可以看出来,GitLab运行的那台服务器上磁盘空间已经不足。

2.2.2 查看日志 通过XShell 登录Gitlab运行的那台服务器,去查看磁盘情况

在这里插入图片描述

查看了磁盘 确实 /data目录以及没有磁盘了。

然后去查看有哪些垃圾文件,清理掉垃圾文件之后,剩余569G可用。

在这里插入图片描述

这个时候再查看下Gitlab上的磁盘空间,查看【Admin Area】-->【Monitoring】-->【Sysetm Info】

在这里插入图片描述

三、重新新建项目

这个时候,重新新建项目就恢复正常啦。

在这里插入图片描述

创建的相关日志日下,查看【Admin Area】-->【Monitoring】-->【Logs】-->【application.log】

在这里插入图片描述
在这里插入图片描述

作者:欧阳鹏 欢迎转载,与人分享是进步的源泉!
转载请保留原文地址:https://blog.csdn.net/qq446282412/article/details/83215306
如果觉得本文对您有所帮助,欢迎您扫码下图所示的支付宝和微信支付二维码对本文进行随意打赏。您的支持将鼓励我继续创作

在这里插入图片描述

相关文章

网友评论

      本文标题:【Git学习】Gitlab创建项目的时候出现了错误 :Faile

      本文链接:https://www.haomeiwen.com/subject/kpkacqtx.html