# GitLab

**GitLab** 是一个 DevOps 软件平台，将基于 Git 的源代码管理与[持续集成](https://www.edgepedia.org/zh/continuous-integration)和持续交付（CI/CD）、规划与跟踪工具以及应用安全扫描整合在同一个应用中。它始于 2011 年由德米特里·扎波罗热茨（Dmitriy Zaporozhets）和瓦列里·西佐夫（Valeriy Sizov）在乌克兰创建的一个开源项目，如今由 GitLab, Inc. 开发——这是一家上市公司，其平台以 SaaS（GitLab.com）、单租户托管服务（GitLab Dedicated）和自管理软件三种形式提供。<sup>[1](https://about.gitlab.com/blog/letter-from-shareholders/)</sup><sup> • </sup><sup>[2](https://docs.gitlab.com/subscriptions/choosing_subscription/)</sup>

| 关键事实 | 详情 |
|---|---|
| 创立 | 2011 年，由德米特里·扎波罗热茨和瓦列里·西佐夫在乌克兰创立；公司于 2014 年注册成立，2015 年参加 Y Combinator 孵化批次<sup>[1](https://about.gitlab.com/blog/letter-from-shareholders/)</sup><sup> • </sup><sup>[3](https://about.gitlab.com/blog/gitlab-inc-takes-the-devops-platform-public/)</sup> |
| 上市公司 | 2021 年 10 月 14 日在纳斯达克上市<sup>[4](https://about.gitlab.com/blog/a-special-farewell-from-gitlab-dmitriy-zaporozhets/)</sup> |
| 许可证 | 核心代码采用 MIT 许可证；文档采用 CC BY-SA 4.0；`ee/` 专有目录采用单独许可证<sup>[5](https://gitlab.com/gitlab-org/gitlab/blob/master/LICENSE)</sup> |
| 产品形态 | GitLab.com（SaaS）、GitLab Dedicated（AWS 上的单租户 SaaS）、GitLab 自管理版<sup>[2](https://docs.gitlab.com/subscriptions/choosing_subscription/)</sup> |
| 层级 | 免费版、高级版和终极版；史诗功能需要高级版或终极版，嵌套子史诗需要终极版<sup>[6](https://docs.gitlab.com/user/group/epics/)</sup> |
| CI/CD 模型 | 流水线在 `.gitlab-ci.yml` 中定义；阶段按顺序运行，同一阶段内的作业并行运行，由已注册的运行器执行作业<sup>[7](https://docs.gitlab.com/ci/pipelines/)</sup><sup> • </sup><sup>[8](https://docs.gitlab.com/ci/runners/)</sup> |
| 员工规模 | 自 2014 年起全员远程办公；截至 2021 年，在 68 个国家拥有 1,300 多名团队成员<sup>[9](https://about.gitlab.com/resources/downloads/gitlab-out-of-the-office-2021.pdf)</sup> |

## 历史

该项目始于 2011 年，当时扎波罗热茨是一名日常使用版本控制软件的软件开发人员，他发现市面上没有现代的开源应用可以让用户在自己的服务器上运行代码托管服务。他与瓦列里·西佐夫一起将 GitLab 作为一个业余项目启动，两人在第一年就围绕它建立了一个运转良好的开源社区。<sup>[1](https://about.gitlab.com/blog/letter-from-shareholders/)</sup><sup> • </sup><sup>[4](https://about.gitlab.com/blog/a-special-farewell-from-gitlab-dmitriy-zaporozhets/)</sup>

**商业化。** 2012 年，荷兰的 Ruby 开发者西德·塞布兰迪（Sid Sijbrandij）在一个科技新闻网站上发现了 GitLab，并启动了 GitLab.com；扎波罗热茨通过电子邮件得知此事，对新增的用户和贡献者表示欢迎。2013 年，扎波罗热茨在推特上表示他希望全职从事 GitLab 的工作，塞布兰迪与他合作使这一愿望成为现实。两人于 2014 年注册成立了 GitLab 公司，申请加入 [Y Combinator](https://www.edgepedia.org/zh/y-combinator)，并于 2015 年参加了其孵化项目。<sup>[3](https://about.gitlab.com/blog/gitlab-inc-takes-the-devops-platform-public/)</sup> 2015 年 7 月 1 日，公司开始以 GitLab, Inc. 的名义运营，这是一家美国公司，取代了此前的荷兰实体 GitLab B.V.。<sup>[10](https://about.gitlab.com/blog/operating-as-gitlab-inc/)</sup> 到 2018 年，公司已融资超过 4,000 万美元，包括 2015 年的 400 万美元 A 轮融资、2016 年的 2,000 万美元 B 轮融资和 2017 年的 2,000 万美元 C 轮融资。<sup>[11](https://about.gitlab.com/resources/downloads/IDC-Innovators-Agile-Code-Development-Technologies-2018.pdf)</sup> GitLab 于 2021 年 10 月 14 日成为上市公司，在纳斯达克上市。<sup>[4](https://about.gitlab.com/blog/a-special-farewell-from-gitlab-dmitriy-zaporozhets/)</sup>

**CI/CD 如何进入产品。** 起初，GitLab 只做源代码管理。之所以加入持续集成，是因为扎波罗热茨厌倦了单独维护 CI 服务器，于是团队将 CI 引入应用中；持续交付随后从 CI 与 SCM 的集成中演化而来。为确保应用本身的质量，扎波罗热茨构建了第二个应用——GitLab CI，用于自动测试 GitLab 自身的代码。<sup>[12](https://about.gitlab.com/blog/gitlab-15-the-retrospective/)</sup><sup> • </sup><sup>[3](https://about.gitlab.com/blog/gitlab-inc-takes-the-devops-platform-public/)</sup>

## 产品形态与层级

GitLab 按产品形态和层级销售。三种产品形态分别是：GitLab.com，无需安装的软件即服务实例；GitLab Dedicated，面向高度监管行业和大型企业的单租户 SaaS 服务；以及 GitLab 自管理版，由客户在自己的[基础设施](https://www.edgepedia.org/zh/infrastructure)上安装、管理和维护的软件。订阅不能在 GitLab.com 和 GitLab 自管理版之间转移；切换产品形态需要新的订阅。<sup>[2](https://docs.gitlab.com/subscriptions/choosing_subscription/)</sup>

功能可用性按层级划分，分为免费版、高级版和终极版。例如，史诗功能需要高级版或终极版，而嵌套子史诗是终极版功能。<sup>[6](https://docs.gitlab.com/user/group/epics/)</sup>

**GitLab Dedicated** 在客户选定的 AWS 区域中，将每个租户运行在完全隔离的实例上，由 GitLab 托管和维护，具备高可用性、灾难恢复和定期更新。它提供 GitLab 自管理终极版的功能集，仅有少量例外。客户通过 Switchboard——GitLab Dedicated 的管理门户——配置自己的实例，而 GitLab 管理底层基础设施；GitLab 在客户选定的每周 4 小时维护窗口内，每月更新实例，提供新功能和安全补丁。<sup>[13](https://docs.gitlab.com/subscriptions/gitlab_dedicated/)</sup><sup> • </sup><sup>[14](https://docs.gitlab.com/administration/dedicated/)</sup>

## 源代码管理与规划

一个 GitLab 项目包含一个 Git 仓库，代码存储在其中，变更通过版本控制进行跟踪；仓库不能脱离项目存在，项目为其提供配置选项。<sup>[15](https://docs.gitlab.com/user/project/repository/)</sup> 工作通过合并请求提出和审查，合并请求要经过一个审查流程，审查者添加评论并建议修改，作者可以直接从 GitLab 界面应用这些修改。审批是若干合并检查之一，确保合并请求只在准备就绪时合并，审查者可以通过设置“请求修改”来阻止合并。<sup>[16](https://docs.gitlab.com/user/project/merge_requests/reviews/)</sup>

在规划方面，GitLab 提供议题、议题看板、里程碑、迭代、任务、需求和时间跟踪，在项目层级之上由群组进行组织。群组可以同时管理一个或多个相关项目：群组成员可以访问群组内的所有项目，群组构成一棵由顶级群组、父群组和子群组组成的树。GitLab 建议将层级保持在五层或更少，并将成员超过 1,000 人的群组拆分为成员不超过 500 人的更小的职能群组，因为深层嵌套加上大量成员可能导致数据库查询超时。<sup>[17](https://docs.gitlab.com/user/group/)</sup>

规划层级的最顶端是史诗，它通过将工作项组织成工作层级来协调大型举措：一个史诗可以是议题、任务、目标或关键结果的父级，在终极版中还可以是子史诗的父级，而子史诗本身又包含进一步的议题和任务。史诗带有计划的开始和结束日期，并支持路线图。史诗已迁移到 GitLab 的统一工作项框架，该框架在 GitLab 17.2 中通过功能标志引入，在 17.6 中于 GitLab.com 上启用，并在 GitLab 18.1 中正式可用。<sup>[6](https://docs.gitlab.com/user/group/epics/)</sup>

## CI/CD

CI/CD 流水线是 [GitLab CI/CD](https://www.edgepedia.org/zh/gitlab-ci-cd) 的基本组件。流水线在 `.gitlab-ci.yml` 文件中使用 YAML 关键字进行配置，由作业和阶段组成——作业执行编译、测试或部署代码等命令，阶段则对作业进行分组。阶段按顺序运行，同一阶段内的作业并行运行；如果某个阶段中的任何作业失败，下一阶段通常不会执行，流水线会提前结束。流水线可以在推送、合并请求或定时调度时自动运行，也可以手动运行。<sup>[7](https://docs.gitlab.com/ci/pipelines/)</sup>

GitLab 支持多种流水线架构：基本的分阶段顺序流水线；基于 `needs` 的流水线，按作业依赖关系运行；分支流水线、合并请求流水线和合并结果流水线；合并列车，将合并请求排队依次合并；父子流水线，将复杂流水线拆分为在同一项目和 SHA 中运行的子流水线，常用于单体仓库；以及多项目流水线，将跨项目的流水线组合在一起。<sup>[7](https://docs.gitlab.com/ci/pipelines/)</sup>

**运行器**是运行 GitLab Runner 应用并执行流水线作业的代理。运行器向 GitLab 注册，建立持久连接；当流水线被触发时，GitLab 将作业放入队列，匹配的运行器会领取作业，每个运行器一次一个作业，并实时回报结果。运行器可以是 GitLab 托管的或自管理的，分为实例运行器、群组运行器和项目运行器。<sup>[8](https://docs.gitlab.com/ci/runners/)</sup> GitLab Runner 实现了多种执行器，包括 [Kubernetes](https://www.edgepedia.org/zh/kubernetes)——为每个作业创建一个包含构建容器和服务容器的 Pod；Docker；以及自动伸缩的 Docker Autoscaler 和 Instance 执行器——通过面向 Google Cloud、AWS 和 Azure 等云提供商的 fleeting 插件按需创建实例。<sup>[18](https://docs.gitlab.com/runner/executors/)</sup>

## 安全扫描

GitLab 的应用安全功能以 CI/CD 作业的形式运行，覆盖仓库和运行中的应用两方面。仓库扫描工具包括针对源代码的静态应用安全测试（SAST）、基础设施即代码扫描、密钥检测和依赖扫描；行为测试工具包括动态应用安全测试（DAST）、API 安全测试和覆盖率引导的模糊测试。扫描默认在推送变更时触发，也可以手动运行、按计划运行或通过扫描执行策略运行。<sup>[19](https://docs.gitlab.com/user/application_security/detect/)</sup>

**密钥检测**针对意外提交到仓库中的凭据。它结合了基于规则的检测——将内容与已知的凭据模式进行匹配，默认支持覆盖主流厂商的 200 多条规则——和通用检测——一项终极版测试功能，根据密钥的周围环境而非已知模式来识别密钥。密钥推送保护在检测到密钥时阻止推送，对于某些类型的密钥，GitLab 可以自动吊销已泄露的凭据。<sup>[20](https://docs.gitlab.com/user/application_security/secret_detection/)</sup><sup> • </sup><sup>[21](https://docs.gitlab.com/user/application_security/secret_detection/detected_secrets/)</sup>

**依赖扫描**识别项目依赖中已知的漏洞，包括运行时、开发时和传递依赖包。对于新项目，推荐的方法是将流水线中生成的 CycloneDX SBOM 制品与 GitLab 公告数据库进行比对扫描，而持续依赖扫描会在公告数据库更新时重新扫描这些组件，因此新披露的漏洞无需重新运行流水线即可浮现。原有的基于 Gemnasium 的分析器自 GitLab 17.9 起已弃用，并提议在 GitLab 20.0 中移除。<sup>[22](https://docs.gitlab.com/user/application_security/dependency_scanning/)</sup>

## 公司与开源模式

GitLab 自 2014 年起就是一家全员远程办公的公司；截至 2021 年，它报告在 68 个国家拥有 1,300 多名团队成员。<sup>[9](https://about.gitlab.com/resources/downloads/gitlab-out-of-the-office-2021.pdf)</sup> 公司自称建立在开源之上，拥有数千名开发者和数百万用户组成的社区为产品做出贡献。<sup>[23](https://about.gitlab.com/images/press/gitlab-data-sheet.pdf)</sup> GitLab 主仓库采用 [MIT 许可证](https://www.edgepedia.org/zh/mit-license)，文档采用 Creative Commons CC BY-SA 4.0，客户端 [JavaScript](https://www.edgepedia.org/zh/javascript) 采用 MIT Expat 许可证，而用于专有企业功能的 `ee/` 目录采用单独许可证。<sup>[5](https://gitlab.com/gitlab-org/gitlab/blob/master/LICENSE)</sup> 扎波罗热茨曾担任公司首任首席技术官，并保持着主仓库提交次数最多的纪录，在公司于当年 10 月上市后，他于 2021 年 11 月从工程研究员职位上卸任。<sup>[4](https://about.gitlab.com/blog/a-special-farewell-from-gitlab-dmitriy-zaporozhets/)</sup>

## References

1. [Letter from shareholders, GitLab (October 8, 2014)](https://about.gitlab.com/blog/letter-from-shareholders/)
2. [GitLab plans, GitLab Docs](https://docs.gitlab.com/subscriptions/choosing_subscription/)
3. [GitLab Inc. takes The DevOps Platform public (Founder's Letter from the S-1), GitLab](https://about.gitlab.com/blog/gitlab-inc-takes-the-devops-platform-public/)
4. [A special farewell from GitLab's Dmitriy Zaporozhets, GitLab (November 10, 2021)](https://about.gitlab.com/blog/a-special-farewell-from-gitlab-dmitriy-zaporozhets/)
5. [LICENSE, gitlab-org/gitlab](https://gitlab.com/gitlab-org/gitlab/blob/master/LICENSE)
6. [Epics, GitLab Docs](https://docs.gitlab.com/user/group/epics/)
7. [CI/CD pipelines, GitLab Docs](https://docs.gitlab.com/ci/pipelines/)
8. [Runners, GitLab Docs](https://docs.gitlab.com/ci/runners/)
9. [About GitLab: Out of the Office (2021), GitLab](https://about.gitlab.com/resources/downloads/gitlab-out-of-the-office-2021.pdf)
10. [GitLab now operating as US corporation, GitLab (July 1, 2015)](https://about.gitlab.com/blog/operating-as-gitlab-inc/)
11. [IDC Innovators: Agile Code Development Technologies, 2018 (GitLab excerpt)](https://about.gitlab.com/resources/downloads/IDC-Innovators-Agile-Code-Development-Technologies-2018.pdf)
12. [GitLab 15: The retrospective, GitLab (June 13, 2022)](https://about.gitlab.com/blog/gitlab-15-the-retrospective/)
13. [GitLab Dedicated, GitLab Docs](https://docs.gitlab.com/subscriptions/gitlab_dedicated/)
14. [Administer GitLab Dedicated, GitLab Docs](https://docs.gitlab.com/administration/dedicated/)
15. [Repository, GitLab Docs](https://docs.gitlab.com/user/project/repository/)
16. [Merge request reviews, GitLab Docs](https://docs.gitlab.com/user/project/merge_requests/reviews/)
17. [Groups, GitLab Docs](https://docs.gitlab.com/user/group/)
18. [Executors, GitLab Docs](https://docs.gitlab.com/runner/executors/)
19. [Detect, GitLab Docs](https://docs.gitlab.com/user/application_security/detect/)
20. [Secret detection, GitLab Docs](https://docs.gitlab.com/user/application_security/secret_detection/)
21. [Detected secrets, GitLab Docs](https://docs.gitlab.com/user/application_security/secret_detection/detected_secrets/)
22. [Dependency scanning, GitLab Docs](https://docs.gitlab.com/user/application_security/dependency_scanning/)
23. [Why choose GitLab? data sheet, GitLab](https://about.gitlab.com/images/press/gitlab-data-sheet.pdf)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Development tools and collaboration infrastructure › Version control and collaboration platforms

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/gitlab

English original: https://www.edgepedia.org/gitlab
