# Leaked GitLab Deploy Token? Revoke It Now

> GitLab deploy token (gldt-) exposed? Revoke it in the project or group, check registry and repository access. Step-by-step guide.

Source: https://leakwatch.net/secrets/gitlab-deploy-token

---

[LeakWatch](/)

[Product](/product)[Live feed](/leaks)[Guides](/secrets)[Blog](/blog)[Free scan](/)

1.  [Home](/)
2.  [Secrets](/secrets)
3.  GitLab Deploy Token

Code & CI · Secret guide

# Leaked GitLab Deploy Token: what to do in the first hour

Critical severityDetected onlyLast verified October 30, 2026 · 4 min read

A GitLab deploy token gives read or write access to a project or group without being tied to a person. Depending on the scopes chosen at creation, it can clone the repository, pull container images from the registry, and read or publish packages. Unlike a personal access token, it cannot call most of the GitLab API, but it can still expose private source code and let someone publish a malicious package or image. Revoke it first, then investigate.

[Check your GitHub account for leaked secrets — free](/)

Provider

GitLab

Severity

Critical

Impact

Source code and build access

Checked live by LeakWatch

No

## What a GitLab deploy token looks like

A deploy token begins with the `gldt-` prefix, followed by 20 characters made of letters, digits, dashes and underscores:

```text
gldt-XXXX…XXXX   GitLab deploy token (masked, 20 characters after the prefix)
```

A deploy token comes as a pair: a username, often generated as `gitlab+deploy-token-` followed by a number, and the token itself used as the password. Both appear in a Git URL, in a `docker login` command, or in a package manager configuration. Variable names such as `CI_DEPLOY_PASSWORD` or `DEPLOY_TOKEN` are common. Do not confuse it with `glpat-` (personal access token), `glrt-` (runner token) or `glptt-` (pipeline trigger token). The prefix tells you which kind of access you have to cut off. Deploy tokens can have an expiry date, but many are created without one.

## How GitLab deploy tokens get leaked

-   **Clone URLs.** A `https://username:token@gitlab.com/...` address committed in a script, a Dockerfile or a submodule setting.
-   **Container and package configuration.** A `docker login` line, a `.npmrc`, a `pip.conf` or a Maven `settings.xml` with the token inside.
-   **CI variables printed in logs.** A job that echoes its environment and a public pipeline log or artifact.
-   **Environment files.** `DEPLOY_TOKEN` in a `.env` or compose file pushed to a public repository.
-   **Documentation and tutorials.** Setup instructions pasted into a wiki, issue or support thread with real values.

## What to do in the first hour

1.  **Open the project or group** that created the token, and go to its deploy tokens list (see the link below). Match the exposed token by its username and name.
2.  **Revoke the token.** Do this before cleaning anything else. A new token can be created afterward with only the scopes that the consumer needs.
3.  **Create a replacement** with the narrowest scopes and a short expiry date, and deploy it to the servers or CI that need it.
4.  **Check the repository.** If the token had the repository scope, someone may have cloned private code. Review what the repository contains that would be sensitive, and rotate any secret committed in it.
5.  **Check the registries.** If it had registry or package scopes, review images and packages pushed since the exposure, and look for tags or versions you did not publish.
6.  **Review audit events.** On paid plans, the audit events page of the project or group records token creation and use. Otherwise, review pipelines, package and registry history.
7.  **Clean up the code** and look for other secrets next to the token. See [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github).

Not sure what else leaked from the same repository? [Run a free scan](/).

[Not sure what else leaked? Run a free scan.](/)

## Revoke it at GitLab

Deploy tokens are managed from the settings of the project or group that owns them, in the repository section, under deploy tokens, in your GitLab account after you sign in with a role allowed to manage them. Each token in the list has a revoke action, and revoking is immediate: the token stops working. A person has not confirmed the exact menu wording for this guide, and the interface can change, so if the page differs from this description, look for the section where deploy tokens are listed, and follow GitLab’s documentation. A self-managed GitLab uses its own address.

## How LeakWatch detects it

The rule is called GitLab Deploy Token. It matches `gldt-` followed by exactly 20 characters from letters, digits, underscore and dash. It does not need a variable name next to the token, because the prefix is distinctive. A body shorter than 20 characters, or a different prefix, is not reported. Because the pattern has no closing boundary, a longer string that begins with a valid 20-character body is still matched on its first 20 characters. The severity is **critical**. This type is not checked live: LeakWatch does not send any request to GitLab with the token it found, so it cannot tell a live token from a revoked one.

LeakWatch detects this format but does **not** check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.

## FAQ

Can a deploy token push code?

Only if it was given a write scope. A repository scope allows reading, and write scopes exist for the container and package registries. Check which scopes the token had when you revoke it.

Is a deploy token tied to my account?

No. It belongs to a project or group and keeps working if the person who created it leaves, so it must be revoked explicitly.

Do I need to rewrite the Git history?

Revoking the token is what protects you. Cleaning history helps avoid repeated alerts, but the value must be considered public once pushed.

## Related

-   [GitLab Personal Access Token](/secrets/gitlab-personal-access-token)
-   [GitLab Runner Registration Token](/secrets/gitlab-runner-registration-token)
-   [GitHub Personal Access Token](/secrets/github-personal-access-token)
-   [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github)
-   [Which vendors leak most this week](/leaks/trends)
-   [All secret guides](/secrets)

[Get alerted next time a secret leaks — create a free account](/)

LeakWatch is not affiliated with GitLab.

![Gabriel Diyan, founder of LeakWatch](/brand/Photo-Gabriel-Diyan.webp)

Gabriel Diyan (0xCr0c0)

Cybersecurity student, founder of LeakWatch. I built and run the scanner described here — the detection patterns, the false-positive classifier and the provider validators are mine. [More about who I am](/about).

[GitHub](https://github.com/Leakwatch-Scan) · [X](https://x.com/LeakwatchScan) · [LinkedIn](https://www.linkedin.com/in/gabriel-diyan-80a378375) · [GitHub (personal)](https://github.com/crocogab)

LeakWatch

Secrets leak into public commits every minute. This watches the forges for yours. Built and run by [Gabriel Diyan](/about), a cybersecurity student — [why LeakWatch exists](/about).

Scan

-   [Product](/product)
-   [Live feed](/leaks)
-   [Trends](/leaks/trends)
-   [API docs](/docs)
-   [CI/CD](/docs?tab=ci)

Read

-   [Blog](/blog)
-   [Secret guides](/secrets)
-   [Changelog](/changelog)
-   [About](/about)

Verify

-   [Security](/security)
-   [Privacy](/privacy)
-   [Terms](/terms)
-   [Legal](/legal)
-   [Contact](/contact)
-   [Status](https://status.leakwatch.net)

© 2026 LeakWatch

[GitHub](https://github.com/Leakwatch-Scan)[X](https://x.com/LeakwatchScan)
