# GitLab NPM Registry
> 原文:[https://docs.gitlab.com/ee/user/packages/npm_registry/](https://docs.gitlab.com/ee/user/packages/npm_registry/)
* [Enabling the NPM Registry](#enabling-the-npm-registry)
* [Getting started](#getting-started)
* [Installing NPM](#installing-npm)
* [Installing Yarn](#installing-yarn)
* [Creating a project](#creating-a-project)
* [Authenticating to the GitLab NPM Registry](#authenticating-to-the-gitlab-npm-registry)
* [Authenticating with a personal access token or deploy token](#authenticating-with-a-personal-access-token-or-deploy-token)
* [Using variables to avoid hard-coding auth token values](#using-variables-to-avoid-hard-coding-auth-token-values)
* [Authenticating with a CI job token](#authenticating-with-a-ci-job-token)
* [Uploading packages](#uploading-packages)
* [Uploading a package with the same version twice](#uploading-a-package-with-the-same-version-twice)
* [Package naming convention](#package-naming-convention)
* [Installing a package](#installing-a-package)
* [Forwarding requests to npmjs.org](#forwarding-requests-to-npmjsorg)
* [Removing a package](#removing-a-package)
* [Publishing a package with CI/CD](#publishing-a-package-with-cicd)
* [Troubleshooting](#troubleshooting)
* [Error running yarn with NPM registry](#error-running-yarn-with-npm-registry)
* [`npm publish` targets default NPM registry (`registry.npmjs.org`)](#npm-publish-targets-default-npm-registry-registrynpmjsorg)
* [`npm install` returns `Error: Failed to replace env in config: ${NPM_TOKEN}`](#npm-install-returns-error-failed-to-replace-env-in-config-npm_token)
* [`npm install` returns `npm ERR! 403 Forbidden`](#npm-install-returns-npm-err-403-forbidden)
* [NPM dependencies metadata](#npm-dependencies-metadata)
* [NPM distribution tags](#npm-distribution-tags)
# GitLab NPM Registry[](#gitlab-npm-registry-premium "Permalink")
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/5934) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.7.
使用 GitLab NPM 注册表,每个项目都可以拥有自己的空间来存储 NPM 软件包.
[![GitLab NPM Registry](https://img.kancloud.cn/d3/a1/d3a15b23b0e659f05e69d8becf54ccdd_2526x832.png)](img/npm_package_view_v12_5.png)
**注意:**仅支持[作用域的](https://s0docs0npmjs0com.icopy.site/misc/scope)程序包.
## Enabling the NPM Registry[](#enabling-the-npm-registry "Permalink")
**注意:**仅当您的 GitLab 管理员[启用了对 NPM 注册表的支持时,](../../../administration/packages/index.html)此选项才可用.
启用 NPM 注册表后,默认情况下它将可用于所有新项目. 要为现有项目启用它,或者要禁用它:
1. 导航到项目的**"设置">"常规">"可见性,项目功能,权限"** .
2. 找到"软件包"功能并启用或禁用它.
3. 单击**保存更改**以使更改生效.
然后,您应该能够在左侧栏中看到" **程序包和注册表"**部分.
在继续使用 GitLab NPM 注册表进行身份验证之前,您应该熟悉软件包的命名约定.
## Getting started[](#getting-started "Permalink")
本节将介绍安装 NPM(或 Yarn)并为您的 JavaScript 项目构建软件包. 如果您不熟悉 NPM 软件包,这是一个快速入门. 如果您已经在使用 NPM 并了解如何构建自己的软件包,请继续[下一节](#authenticating-to-the-gitlab-npm-registry) .
### Installing NPM[](#installing-npm "Permalink")
按照[npmjs.com](https://s0docs0npmjs0com.icopy.site/downloading-and-installing-node-js-and-npm)上的说明下载 Node.js 和 NPM 并将其安装到本地开发环境.
安装完成后,通过运行以下命令验证您可以在终端中使用 NPM:
```
npm --version
```
您应该会在输出中看到 NPM 版本:
```
6.10.3
```
### Installing Yarn[](#installing-yarn "Permalink")
您可能需要安装并使用 Yarn 替代 NPM. 请按照[yarnpkg.com](https://classic.yarnpkg.com/en/docs/install)上的说明在您的开发环境上进行安装.
Once installed, you can verify that Yarn is available with the following command:
```
yarn --version
```
You should see the version printed like so:
```
1.19.1
```
### Creating a project[](#creating-a-project "Permalink")
了解如何创建完整的 JavaScript 项目不在本指南的范围内,但是您可以通过创建并导航到空目录并使用以下命令来初始化新的空包:
```
npm init
```
或者,如果您使用的是 Yarn:
```
yarn init
```
这将带您解决一系列问题,以产生`package.json`文件,这是所有 NPM 软件包所必需的. 最重要的问题是软件包名称. NPM 软件包必须[遵循命名约定,](#package-naming-convention)并且范围应限于注册表所在的项目或组.
完成设置后,现在就可以将软件包上传到 GitLab 注册表了. 首先,您需要设置身份验证,然后将 GitLab 配置为远程注册表.
## Authenticating to the GitLab NPM Registry[](#authenticating-to-the-gitlab-npm-registry "Permalink")
如果项目是私有项目,或者您要将 NPM 软件包上传到 GitLab,则需要提供凭据进行身份验证. 首选[个人访问令牌](../../profile/personal_access_tokens.html)和[部署令牌](../../project/deploy_tokens/index.html) ,但支持[OAuth 令牌](../../../api/oauth2.html#resource-owner-password-credentials-flow) .
**双因素认证(2FA)仅支持个人访问令牌:**如果你有 2FA 启用,你需要使用一个[令牌个人访问](../../profile/personal_access_tokens.html)使用 OAuth 标题与范围设置为`api`或[令牌部署](../../project/deploy_tokens/index.html)与`read_package_registry`或`write_package_registry`范围. 标准 OAuth 令牌将无法向 GitLab NPM 注册表进行身份验证.
### Authenticating with a personal access token or deploy token[](#authenticating-with-a-personal-access-token-or-deploy-token "Permalink")
要使用[个人访问令牌](../../profile/personal_access_tokens.html)或[部署令牌进行](../../project/deploy_tokens/index.html)身份验证,请设置 NPM 配置:
```
# Set URL for your scoped packages.
# For example package with name `@foo/bar` will use this URL for download
npm config set @foo:registry https://gitlab.com/api/v4/packages/npm/
# Add the token for the scoped packages URL. This will allow you to download
# `@foo/` packages from private projects.
npm config set '//gitlab.com/api/v4/packages/npm/:_authToken' "<your_token>"
# Add token for uploading to the registry. Replace <your_project_id>
# with the project you want your package to be uploaded to.
npm config set '//gitlab.com/api/v4/projects/<your_project_id>/packages/npm/:_authToken' "<your_token>"
```
将`<your_project_id>`替换为可以在项目主页上找到的项目 ID,并将`<your_token>`替换为个人访问令牌或部署令牌.
如果您具有自行管理的 GitLab 安装, `gitlab.com`使用您的域名替换`gitlab.com` .
现在,您应该能够将 NPM 软件包下载并上传到您的项目.
**注意:**如果遇到有关[Yarn](https://classic.yarnpkg.com/en/)的错误消息,请参阅[故障排除部分](#troubleshooting) .
### Using variables to avoid hard-coding auth token values[](#using-variables-to-avoid-hard-coding-auth-token-values "Permalink")
为了避免对`authToken`值进行硬编码,可以在其位置使用变量:
```
npm config set '//gitlab.com/api/v4/projects/<your_project_id>/packages/npm/:_authToken' "${NPM_TOKEN}"
npm config set '//gitlab.com/api/v4/packages/npm/:_authToken' "${NPM_TOKEN}"
```
然后,您可以在本地或通过 GitLab CI / CD 运行`npm publish` :
* **本地:**发布前导出`NPM_TOKEN` :
```
NPM_TOKEN=<your_token> npm publish
```
* **GitLab CI / CD:**设置`NPM_TOKEN` [变量](../../../ci/variables/README.html)下,项目的**设置> CI / CD>变量** .
### Authenticating with a CI job token[](#authenticating-with-a-ci-job-token "Permalink")
在 GitLab Premium 12.5 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/9104) .
如果您将 NPM 与 GitLab CI / CD 一起使用,则可以使用 CI 作业令牌代替个人访问令牌或部署令牌. 令牌将继承生成管道的用户的权限.
将相应的部分添加到您的`.npmrc`文件中:
```
@foo:registry=https://gitlab.com/api/v4/packages/npm/
//gitlab.com/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}
//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}
```
## Uploading packages[](#uploading-packages "Permalink")
在能够上载软件包之前,您需要为 NPM 指定注册表. 为此,将以下部分添加到`package.json`的底部:
```
"publishConfig": { "@foo:registry":"https://gitlab.com/api/v4/projects/<your_project_id>/packages/npm/" }
```
将`<your_project_id>`替换为您的项目 ID(可在项目的主页上找到),然后将`@foo`替换为您自己的作用域.
如果您具有自行管理的 GitLab 安装, `gitlab.com`使用您的域名替换`gitlab.com` .
启用它并设置[身份验证后](#authenticating-to-the-gitlab-npm-registry) ,您可以将 NPM 包上传到您的项目中:
```
npm publish
```
然后,您可以导航到项目的" **程序包和注册表"**页面,查看上载的程序包,甚至删除它们.
如果尝试使用给定范围内已经存在的名称发布程序包,则会收到`403 Forbidden!` 错误.
## Uploading a package with the same version twice[](#uploading-a-package-with-the-same-version-twice "Permalink")
您不能两次上传相同名称和版本的软件包,除非先删除现有软件包. 这与 npmjs.org 的行为保持一致,但 npmjs.org 不允许用户多次发布同一版本,即使该版本已被删除也是如此.
## Package naming convention[](#package-naming-convention "Permalink")
**程序包的作用域必须在项目的根名称空间中** . 程序包名称可以是任何名称,但最好使用项目名称,除非由于命名冲突而无法使用. 例如:
| Project | Package | Supported |
| --- | --- | --- |
| `foo/bar` | `@foo/bar` | Yes |
| `foo/bar/baz` | `@foo/baz` | Yes |
| `foo/bar/buz` | `@foo/anything` | Yes |
| `gitlab-org/gitlab` | `@gitlab-org/gitlab` | Yes |
| `gitlab-org/gitlab` | `@foo/bar` | No |
用于命名的正则表达式正在验证来自所有程序包管理器的所有程序包名称:
```
/\A\@?(([\w\-\.\+]*)\/)*([\w\-\.]+)@?(([\w\-\.\+]*)\/)*([\w\-\.]*)\z/
```
它允许使用大写字母,而 NPM 不允许,并且几乎允许 NPM 允许的所有字符,但有少数例外(不允许`~` ).
**注意:**需要大写字母,因为要求范围必须与项目的顶级名称空间相同. 因此,例如,如果您的项目路径为`My-Group/project-foo` ,则您的程序包必须命名为`@My-Group/any-package-name` . `@my-group/any-package-name`不起作用.**在更新用户/组的路径或传输(子)组/项目时:**如果使用 NPM 包更新**项目**的根名称空间,则更改将被拒绝. 为此,请确保先删除所有 NPM 软件包. 不要忘记更新`.npmrc`文件以遵循上述命名约定,并在必要时运行`npm publish` .
现在,您可以配置项目以通过 GitLab NPM 注册表进行身份验证.
## Installing a package[](#installing-a-package "Permalink")
NPM 软件包通常使用 JavaScript 项目中的`npm`或`yarn`命令安装. 如果尚未安装,则需要设置作用域软件包的 URL. 您可以使用以下命令执行此操作:
```
npm config set @foo:registry https://gitlab.com/api/v4/packages/npm/
```
您将需要用您的作用域替换`@foo` .
接下来,您需要确保已设置[身份验证](#authenticating-to-the-gitlab-npm-registry) ,以便成功安装软件包. 完成此操作后,您可以在项目中运行以下命令来安装软件包:
```
npm install @my-project-scope/my-package
```
或者,如果您使用的是 Yarn:
```
yarn add @my-project-scope/my-package
```
### Forwarding requests to npmjs.org[](#forwarding-requests-to-npmjsorg "Permalink")
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/55344) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.9.
默认情况下,当在 GitLab NPM 注册表中找不到 NPM 软件包时,该请求将转发到[npmjs.com](https://s0www0npmjs0com.icopy.site/) .
管理员可以在" [持续集成"设置中](../../admin_area/settings/continuous_integration.html)禁用此行为.
## Removing a package[](#removing-a-package "Permalink")
在项目页面的软件包视图中,您可以通过单击红色垃圾图标或单击软件包详细信息页面上的**删除**按钮来**删除**软件包.
## Publishing a package with CI/CD[](#publishing-a-package-with-cicd "Permalink")
要在[GitLab CI / CD 中](./../../../ci/README.html)使用 NPM 命令,可以使用`CI_JOB_TOKEN`代替个人访问令牌或在命令中部署令牌.
一个简单的`.gitlab-ci.yml`文件示例,用于发布 NPM 软件包:
```
image: node:latest
stages:
- deploy
deploy:
stage: deploy
script:
- echo '//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}'>.npmrc
- npm publish
```
了解有关[使用`CI_JOB_TOKEN`验证 GitLab NPM 注册表的更多信息](#authenticating-with-a-ci-job-token) .
## Troubleshooting[](#troubleshooting "Permalink")
### Error running yarn with NPM registry[](#error-running-yarn-with-npm-registry "Permalink")
如果您在 NPM 注册表中使用[yarn](https://classic.yarnpkg.com/en/) ,则可能会收到以下错误消息:
```
yarn install v1.15.2
warning package.json: No license field
info No lockfile found.
warning XXX: No license field
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
error An unexpected error occurred: "https://gitlab.com/api/v4/projects/XXX/packages/npm/XXX/XXX/-/XXX/XXX-X.X.X.tgz: Request failed \"404 Not Found\"".
info If you think this is a bug, please open a bug report with the information provided in "/Users/XXX/gitlab-migration/module-util/yarn-error.log".
info Visit https://classic.yarnpkg.com/en/docs/cli/install for documentation about this command
```
在这种情况下,请尝试将其添加到您的`.npmrc`文件中(并将`<your_token>`替换为您的个人访问令牌或部署令牌):
```
//gitlab.com/api/v4/projects/:_authToken=<your_token>
```
### `npm publish` targets default NPM registry (`registry.npmjs.org`)[](#npm-publish-targets-default-npm-registry-registrynpmjsorg "Permalink")
确保在`package.json`和`.npmrc`文件中一致设置了包作用域.
例如,如果您在 GitLab 中的项目名称为`foo/my-package` ,则`package.json`文件应如下所示:
```
{ "name": "@foo/my-package", "version": "1.0.0", "description": "Example package for GitLab NPM registry", "publishConfig": { "@foo:registry":"https://gitlab.com/api/v4/projects/<your_project_id>/packages/npm/" } }
```
`.npmrc`文件应如下所示:
```
//gitlab.com/api/v4/projects/<your_project_id>/packages/npm/:_authToken=<your_token>
//gitlab.com/api/v4/packages/npm/:_authToken=<your_token>
@foo:registry=https://gitlab.com/api/v4/packages/npm/
```
### `npm install` returns `Error: Failed to replace env in config: ${NPM_TOKEN}`[](#npm-install-returns-error-failed-to-replace-env-in-config-npm_token "Permalink")
除非您的项目是私有的,否则您不需要令牌即可运行`npm install` (仅要求发布令牌). 如果`.npmrc`文件是以`$NPM_TOKEN`的引用签`$NPM_TOKEN` ,则可以将其删除. 如果您希望保留参考,则需要在运行`npm install`之前设置一个值,或者使用[GitLab 环境变量](./../../../ci/variables/README.html)来设置该值:
```
NPM_TOKEN=<your_token> npm install
```
### `npm install` returns `npm ERR! 403 Forbidden`[](#npm-install-returns-npm-err-403-forbidden "Permalink")
* 检查您的令牌是否已过期并具有适当的权限.
* 检查您是否尝试发布名称在给定范围内已经存在的软件包.
* 确保作用域的软件包 URL 包含斜杠:
* 正确: `//gitlab.com/api/v4/packages/npm/`
* 错误的: `//gitlab.com/api/v4/packages/npm`
## NPM dependencies metadata[](#npm-dependencies-metadata "Permalink")
在 GitLab Premium 12.6 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/11867) .
从 GitLab 12.6 开始,发布到 GitLab NPM 注册表的新软件包向 NPM 客户端公开了以下属性:
* name
* version
* dist-tags
* dependencies
* dependencies
* devDependencies
* bundleDependencies
* peerDependencies
* deprecated
## NPM distribution tags[](#npm-distribution-tags "Permalink")
在 GitLab Premium 12.8 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/9425) .
您可以为新发布的软件包添加[分发标签](https://s0docs0npmjs0com.icopy.site/cli/dist-tag) . 它们遵循 NPM 的约定,在这些约定中它们是可选的,并且每个标签一次只能分配给一个软件包. 当发布没有标签的软件包时,默认情况下会添加`latest`标签. 在未指定标签或版本的情况下安装软件包也是如此.
支持的`dist-tag`命令和通常使用标签的示例:
```
npm publish @scope/package --tag # Publish new package with new tag
npm dist-tag add @scope/package@version my-tag # Add a tag to an existing package
npm dist-tag ls @scope/package # List all tags under the package
npm dist-tag rm @scope/package@version my-tag # Delete a tag from the package
npm install @scope/package@my-tag # Install a specific tag
```
**警告:**由于 NPM 6.9.0 中的错误,删除 dist 标签失败. 确保您的 NPM 版本大于 6.9.1.
- GitLab Docs
- Installation
- Requirements
- GitLab cloud native Helm Chart
- Install GitLab with Docker
- Installation from source
- Install GitLab on Microsoft Azure
- Installing GitLab on Google Cloud Platform
- Installing GitLab on Amazon Web Services (AWS)
- Analytics
- Code Review Analytics
- Productivity Analytics
- Value Stream Analytics
- Kubernetes clusters
- Adding and removing Kubernetes clusters
- Adding EKS clusters
- Adding GKE clusters
- Group-level Kubernetes clusters
- Instance-level Kubernetes clusters
- Canary Deployments
- Cluster Environments
- Deploy Boards
- GitLab Managed Apps
- Crossplane configuration
- Cluster management project (alpha)
- Kubernetes Logs
- Runbooks
- Serverless
- Deploying AWS Lambda function using GitLab CI/CD
- Securing your deployed applications
- Groups
- Contribution Analytics
- Custom group-level project templates
- Epics
- Manage epics
- Group Import/Export
- Insights
- Issues Analytics
- Iterations
- Public access
- SAML SSO for GitLab.com groups
- SCIM provisioning using SAML SSO for GitLab.com groups
- Subgroups
- Roadmap
- Projects
- GitLab Secure
- Security Configuration
- Container Scanning
- Dependency Scanning
- Dependency List
- Static Application Security Testing (SAST)
- Secret Detection
- Dynamic Application Security Testing (DAST)
- GitLab Security Dashboard
- Offline environments
- Standalone Vulnerability pages
- Security scanner integration
- Badges
- Bulk editing issues and merge requests at the project level
- Code Owners
- Compliance
- License Compliance
- Compliance Dashboard
- Create a project
- Description templates
- Deploy Keys
- Deploy Tokens
- File finder
- Project integrations
- Integrations
- Atlassian Bamboo CI Service
- Bugzilla Service
- Custom Issue Tracker service
- Discord Notifications service
- Enabling emails on push
- GitHub project integration
- Hangouts Chat service
- Atlassian HipChat
- Irker IRC Gateway
- GitLab Jira integration
- Mattermost Notifications Service
- Mattermost slash commands
- Microsoft Teams service
- Mock CI Service
- Prometheus integration
- Redmine Service
- Slack Notifications Service
- Slack slash commands
- GitLab Slack application
- Webhooks
- YouTrack Service
- Insights
- Issues
- Crosslinking Issues
- Design Management
- Confidential issues
- Due dates
- Issue Boards
- Issue Data and Actions
- Labels
- Managing issues
- Milestones
- Multiple Assignees for Issues
- Related issues
- Service Desk
- Sorting and ordering issue lists
- Issue weight
- Associate a Zoom meeting with an issue
- Merge requests
- Allow collaboration on merge requests across forks
- Merge Request Approvals
- Browser Performance Testing
- How to create a merge request
- Cherry-pick changes
- Code Quality
- Load Performance Testing
- Merge Request dependencies
- Fast-forward merge requests
- Merge when pipeline succeeds
- Merge request conflict resolution
- Reverting changes
- Reviewing and managing merge requests
- Squash and merge
- Merge requests versions
- Draft merge requests
- Members of a project
- Migrating projects to a GitLab instance
- Import your project from Bitbucket Cloud to GitLab
- Import your project from Bitbucket Server to GitLab
- Migrating from ClearCase
- Migrating from CVS
- Import your project from FogBugz to GitLab
- Gemnasium
- Import your project from GitHub to GitLab
- Project importing from GitLab.com to your private GitLab instance
- Import your project from Gitea to GitLab
- Import your Jira project issues to GitLab
- Migrating from Perforce Helix
- Import Phabricator tasks into a GitLab project
- Import multiple repositories by uploading a manifest file
- Import project from repo by URL
- Migrating from SVN to GitLab
- Migrating from TFVC to Git
- Push Options
- Releases
- Repository
- Branches
- Git Attributes
- File Locking
- Git file blame
- Git file history
- Repository mirroring
- Protected branches
- Protected tags
- Push Rules
- Reduce repository size
- Signing commits with GPG
- Syntax Highlighting
- GitLab Web Editor
- Web IDE
- Requirements Management
- Project settings
- Project import/export
- Project access tokens (Alpha)
- Share Projects with other Groups
- Snippets
- Static Site Editor
- Wiki
- Project operations
- Monitor metrics for your CI/CD environment
- Set up alerts for Prometheus metrics
- Embedding metric charts within GitLab-flavored Markdown
- Embedding Grafana charts
- Using the Metrics Dashboard
- Dashboard YAML properties
- Metrics dashboard settings
- Panel types for dashboards
- Using Variables
- Templating variables for metrics dashboards
- Prometheus Metrics library
- Monitoring AWS Resources
- Monitoring HAProxy
- Monitoring Kubernetes
- Monitoring NGINX
- Monitoring NGINX Ingress Controller
- Monitoring NGINX Ingress Controller with VTS metrics
- Alert Management
- Error Tracking
- Tracing
- Incident Management
- GitLab Status Page
- Feature Flags
- GitLab CI/CD
- GitLab CI/CD pipeline configuration reference
- GitLab CI/CD include examples
- Introduction to CI/CD with GitLab
- Getting started with GitLab CI/CD
- How to enable or disable GitLab CI/CD
- Using SSH keys with GitLab CI/CD
- Migrating from CircleCI
- Migrating from Jenkins
- Auto DevOps
- Getting started with Auto DevOps
- Requirements for Auto DevOps
- Customizing Auto DevOps
- Stages of Auto DevOps
- Upgrading PostgreSQL for Auto DevOps
- Cache dependencies in GitLab CI/CD
- GitLab ChatOps
- Cloud deployment
- Docker integration
- Building Docker images with GitLab CI/CD
- Using Docker images
- Building images with kaniko and GitLab CI/CD
- GitLab CI/CD environment variables
- Predefined environment variables reference
- Where variables can be used
- Deprecated GitLab CI/CD variables
- Environments and deployments
- Protected Environments
- GitLab CI/CD Examples
- Test a Clojure application with GitLab CI/CD
- Using Dpl as deployment tool
- Testing a Phoenix application with GitLab CI/CD
- End-to-end testing with GitLab CI/CD and WebdriverIO
- DevOps and Game Dev with GitLab CI/CD
- Deploy a Spring Boot application to Cloud Foundry with GitLab CI/CD
- How to deploy Maven projects to Artifactory with GitLab CI/CD
- Testing PHP projects
- Running Composer and NPM scripts with deployment via SCP in GitLab CI/CD
- Test and deploy Laravel applications with GitLab CI/CD and Envoy
- Test and deploy a Python application with GitLab CI/CD
- Test and deploy a Ruby application with GitLab CI/CD
- Test and deploy a Scala application to Heroku
- GitLab CI/CD for external repositories
- Using GitLab CI/CD with a Bitbucket Cloud repository
- Using GitLab CI/CD with a GitHub repository
- GitLab Pages
- GitLab Pages
- GitLab Pages domain names, URLs, and baseurls
- Create a GitLab Pages website from scratch
- Custom domains and SSL/TLS Certificates
- GitLab Pages integration with Let's Encrypt
- GitLab Pages Access Control
- Exploring GitLab Pages
- Incremental Rollouts with GitLab CI/CD
- Interactive Web Terminals
- Optimizing GitLab for large repositories
- Metrics Reports
- CI/CD pipelines
- Pipeline Architecture
- Directed Acyclic Graph
- Multi-project pipelines
- Parent-child pipelines
- Pipelines for Merge Requests
- Pipelines for Merged Results
- Merge Trains
- Job artifacts
- Pipeline schedules
- Pipeline settings
- Triggering pipelines through the API
- Review Apps
- Configuring GitLab Runners
- GitLab CI services examples
- Using MySQL
- Using PostgreSQL
- Using Redis
- Troubleshooting CI/CD
- GitLab Package Registry
- GitLab Container Registry
- Dependency Proxy
- GitLab Composer Repository
- GitLab Conan Repository
- GitLab Maven Repository
- GitLab NPM Registry
- GitLab NuGet Repository
- GitLab PyPi Repository
- API Docs
- API resources
- .gitignore API
- GitLab CI YMLs API
- Group and project access requests API
- Appearance API
- Applications API
- Audit Events API
- Avatar API
- Award Emoji API
- Project badges API
- Group badges API
- Branches API
- Broadcast Messages API
- Project clusters API
- Group clusters API
- Instance clusters API
- Commits API
- Container Registry API
- Custom Attributes API
- Dashboard annotations API
- Dependencies API
- Deploy Keys API
- Deployments API
- Discussions API
- Dockerfiles API
- Environments API
- Epics API
- Events
- Feature Flags API
- Feature flag user lists API
- Freeze Periods API
- Geo Nodes API
- Group Activity Analytics API
- Groups API
- Import API
- Issue Boards API
- Group Issue Boards API
- Issues API
- Epic Issues API
- Issues Statistics API
- Jobs API
- Keys API
- Labels API
- Group Labels API
- License
- Licenses API
- Issue links API
- Epic Links API
- Managed Licenses API
- Markdown API
- Group and project members API
- Merge request approvals API
- Merge requests API
- Project milestones API
- Group milestones API
- Namespaces API
- Notes API
- Notification settings API
- Packages API
- Pages domains API
- Pipeline schedules API
- Pipeline triggers API
- Pipelines API
- Project Aliases API
- Project import/export API
- Project repository storage moves API
- Project statistics API
- Project templates API
- Projects API
- Protected branches API
- Protected tags API
- Releases API
- Release links API
- Repositories API
- Repository files API
- Repository submodules API
- Resource label events API
- Resource milestone events API
- Resource weight events API
- Runners API
- SCIM API
- Search API
- Services API
- Application settings API
- Sidekiq Metrics API
- Snippets API
- Project snippets
- Application statistics API
- Suggest Changes API
- System hooks API
- Tags API
- Todos API
- Users API
- Project-level Variables API
- Group-level Variables API
- Version API
- Vulnerabilities API
- Vulnerability Findings API
- Wikis API
- GraphQL API
- Getting started with GitLab GraphQL API
- GraphQL API Resources
- API V3 to API V4
- Validate the .gitlab-ci.yml (API)
- User Docs
- Abuse reports
- User account
- Active sessions
- Deleting a User account
- Permissions
- Personal access tokens
- Profile preferences
- Threads
- GitLab and SSH keys
- GitLab integrations
- Git
- GitLab.com settings
- Infrastructure as code with Terraform and GitLab
- GitLab keyboard shortcuts
- GitLab Markdown
- AsciiDoc
- GitLab Notification Emails
- GitLab Quick Actions
- Autocomplete characters
- Reserved project and group names
- Search through GitLab
- Advanced Global Search
- Advanced Syntax Search
- Time Tracking
- GitLab To-Do List
- Administrator Docs
- Reference architectures
- Reference architecture: up to 1,000 users
- Reference architecture: up to 2,000 users
- Reference architecture: up to 3,000 users
- Reference architecture: up to 5,000 users
- Reference architecture: up to 10,000 users
- Reference architecture: up to 25,000 users
- Reference architecture: up to 50,000 users
- Troubleshooting a reference architecture set up
- Working with the bundled Consul service
- Configuring PostgreSQL for scaling
- Configuring GitLab application (Rails)
- Load Balancer for multi-node GitLab
- Configuring a Monitoring node for Scaling and High Availability
- NFS
- Working with the bundled PgBouncer service
- Configuring Redis for scaling
- Configuring Sidekiq
- Admin Area settings
- Continuous Integration and Deployment Admin settings
- Custom instance-level project templates
- Diff limits administration
- Enable and disable GitLab features deployed behind feature flags
- Geo nodes Admin Area
- GitLab Pages administration
- Health Check
- Job logs
- Labels administration
- Log system
- PlantUML & GitLab
- Repository checks
- Repository storage paths
- Repository storage types
- Account and limit settings
- Service templates
- System hooks
- Changing your time zone
- Uploads administration
- Abuse reports
- Activating and deactivating users
- Audit Events
- Blocking and unblocking users
- Broadcast Messages
- Elasticsearch integration
- Gitaly
- Gitaly Cluster
- Gitaly reference
- Monitoring GitLab
- Monitoring GitLab with Prometheus
- Performance Bar
- Usage statistics
- Object Storage
- Performing Operations in GitLab
- Cleaning up stale Redis sessions
- Fast lookup of authorized SSH keys in the database
- Filesystem Performance Benchmarking
- Moving repositories managed by GitLab
- Run multiple Sidekiq processes
- Sidekiq MemoryKiller
- Switching to Puma
- Understanding Unicorn and unicorn-worker-killer
- User lookup via OpenSSH's AuthorizedPrincipalsCommand
- GitLab Package Registry administration
- GitLab Container Registry administration
- Replication (Geo)
- Geo database replication
- Geo with external PostgreSQL instances
- Geo configuration
- Using a Geo Server
- Updating the Geo nodes
- Geo with Object storage
- Docker Registry for a secondary node
- Geo for multiple nodes
- Geo security review (Q&A)
- Location-aware Git remote URL with AWS Route53
- Tuning Geo
- Removing secondary Geo nodes
- Geo data types support
- Geo Frequently Asked Questions
- Geo Troubleshooting
- Geo validation tests
- Disaster Recovery (Geo)
- Disaster recovery for planned failover
- Bring a demoted primary node back online
- Automatic background verification
- Rake tasks
- Back up and restore GitLab
- Clean up
- Namespaces
- Maintenance Rake tasks
- Geo Rake Tasks
- GitHub import
- Import bare repositories
- Integrity check Rake task
- LDAP Rake tasks
- Listing repository directories
- Praefect Rake tasks
- Project import/export administration
- Repository storage Rake tasks
- Generate sample Prometheus data
- Uploads migrate Rake tasks
- Uploads sanitize Rake tasks
- User management
- Webhooks administration
- X.509 signatures
- Server hooks
- Static objects external storage
- Updating GitLab
- GitLab release and maintenance policy
- Security
- Password Storage
- Custom password length limits
- Restrict allowed SSH key technologies and minimum length
- Rate limits
- Webhooks and insecure internal web services
- Information exclusivity
- How to reset your root password
- How to unlock a locked user from the command line
- User File Uploads
- How we manage the TLS protocol CRIME vulnerability
- User email confirmation at sign-up
- Security of running jobs
- Proxying assets
- CI/CD Environment Variables
- Contributor and Development Docs
- Contribute to GitLab
- Community members & roles
- Implement design & UI elements
- Issues workflow
- Merge requests workflow
- Code Review Guidelines
- Style guides
- GitLab Architecture Overview
- CI/CD development documentation
- Database guides
- Database Review Guidelines
- Database Review Guidelines
- Migration Style Guide
- What requires downtime?
- Understanding EXPLAIN plans
- Rake tasks for developers
- Mass inserting Rails models
- GitLab Documentation guidelines
- Documentation Style Guide
- Documentation structure and template
- Documentation process
- Documentation site architecture
- Global navigation
- GitLab Docs monthly release process
- Telemetry Guide
- Usage Ping Guide
- Snowplow Guide
- Experiment Guide
- Feature flags in development of GitLab
- Feature flags process
- Developing with feature flags
- Feature flag controls
- Document features deployed behind feature flags
- Frontend Development Guidelines
- Accessibility & Readability
- Ajax
- Architecture
- Axios
- Design Patterns
- Frontend Development Process
- DropLab
- Emojis
- Filter
- Frontend FAQ
- GraphQL
- Icons and SVG Illustrations
- InputSetter
- Performance
- Principles
- Security
- Tooling
- Vuex
- Vue
- Geo (development)
- Geo self-service framework (alpha)
- Gitaly developers guide
- GitLab development style guides
- API style guide
- Go standards and style guidelines
- GraphQL API style guide
- Guidelines for shell commands in the GitLab codebase
- HTML style guide
- JavaScript style guide
- Migration Style Guide
- Newlines style guide
- Python Development Guidelines
- SCSS style guide
- Shell scripting standards and style guidelines
- Sidekiq debugging
- Sidekiq Style Guide
- SQL Query Guidelines
- Vue.js style guide
- Instrumenting Ruby code
- Testing standards and style guidelines
- Flaky tests
- Frontend testing standards and style guidelines
- GitLab tests in the Continuous Integration (CI) context
- Review Apps
- Smoke Tests
- Testing best practices
- Testing levels
- Testing Rails migrations at GitLab
- Testing Rake tasks
- End-to-end Testing
- Beginner's guide to writing end-to-end tests
- End-to-end testing Best Practices
- Dynamic Element Validation
- Flows in GitLab QA
- Page objects in GitLab QA
- Resource class in GitLab QA
- Style guide for writing end-to-end tests
- Testing with feature flags
- Translate GitLab to your language
- Internationalization for GitLab
- Translating GitLab
- Proofread Translations
- Merging translations from CrowdIn
- Value Stream Analytics development guide
- GitLab subscription
- Activate GitLab EE with a license