文章摘要
作者多年来一直使用GitLab进行私人项目开发,最初因其免费私有仓库功能而选择它。虽然GitHub后来也免费了,但作者的工作流已完全基于GitLab,尤其依赖其内置的容器注册表功能,简化了Docker镜像的构建和部署流程。
文章总结
我为什么喜欢使用GitLab
缘起
最初选择GitLab是因为它提供免费的私有仓库(当时GitHub还收费)。虽然后来GitHub也开放了免费私有仓库,但我的工作流已经深度集成在GitLab生态中——包括CI流水线、Docker镜像和部署脚本等所有环节。
核心优势
内置容器注册表
- 每个项目自带Docker镜像仓库,无需额外维护Docker Hub账户
- 完美解决拉取频率限制问题
- 10GB存储空间对个人项目完全够用(通过清理旧标签和共享基础层)
CI/CD系统
- 通过简单的.gitlab-ci.yml文件实现"代码即配置"
- 支持手动触发部署环节
- 免费共享Runner满足基础需求,特殊需求可通过VPS轻松搭建专属Runner
- 详尽的文档体系(虽然存在功能过多导致的检索困难)
使用痛点
- 界面响应速度:操作时有明显延迟感(虽近期有所改善)
- 功能过载:集成了项目管理/安全扫描/基础设施管理等过多功能,实际仅使用代码仓库/MR/CI/CD等核心功能
个人工作流
- GitLab:作为"数字工作坊",存放所有私有项目(包括原型/半成品/实验性项目)
- GitHub:专门展示成熟的公开项目
- 这种分工模式既能享受GitHub的社交属性,又能利用GitLab完整的DevOps工具链
价值体现
目前维护着十余个私有项目(从活跃项目到"以防万一"保留的废弃实验),全部享受完整的CI/CD和容器服务而不产生任何费用。这种零成本获取专业级工具链的体验,正是GitLab对个人开发者最大的吸引力。
编辑注:原文中导航菜单、命令行提示符等非核心内容已精简,聚焦于GitLab的功能体验与工作流分析。
评论总结
以下是评论内容的总结:
支持GitLab的观点
功能全面且集成度高
- "GitLab is pretty great - it's there for you, be it in the cloud or on-prem" (KronisLV)
- "everything being integrated can also be delightfully simple and usable" (KronisLV)
CI/CD体验优秀
- "I immensely enjoy working with GitLab CI at work" (KronisLV)
- "It's CICD syntax is a breeze for the most part too" (vibe_assassin)
自托管和AI功能
- "the self-hosted version, including the AI features (Duo) that can also be self-hosted" (bratao)
批评GitLab的观点
界面缓慢且资源占用高
- "The GitLab web interface has always felt sluggish to me" (ksec)
- "the slow interface... is so incredibly painful on MR-views" (traspler)
功能过多且部分功能不完善
- "many features seem to be stuck in either the 80/20 hell" (traspler)
- "the sheer number of features... And the constant waiting" (javier2)
免费版功能限制
- "the free version doesn't have PR requirements or multiple reviewers etc." (egeozcan)
推荐替代品(如Forgejo)的观点
轻量且高效
- "Forgejo is simpler... It allows me to hide features per project that I don't need" (NorwegianDude)
- "Forgejo does all that while being lightweight and run by a non-profit" (flipped)
资源占用低
- "Power usage on the server dropped by 10%" (NorwegianDude)
- "It's really fast and takes a fraction of the resources Gitlab does" (lkramer)
开源和免费
- "no features are paid... at least when they are available they'll be free!" (IshKebab)
其他观点
用户体验问题
- "the UI is one huge block of text... with absolutely no distinction" (prymitive)
- "you have action buttons buried in the middle of the page" (prymitive)
公司发展方向
- "their IPO lead to more chasing flash and less attention to quality" (acdha)
CI/CD测试困难
- "testing the CI/CD script on gitlab... It doesn't exist, and it's hell" (paskejl)
总结显示,GitLab在功能集成和CI/CD方面受到好评,但在性能、资源占用和免费版功能限制上受到批评。许多用户推荐Forgejo作为更轻量且高效的替代品。