# GitLab mirror (pkg.shecan.ir)

> Mirror of packages.gitlab.com (apt and dnf/yum repositories of gitlab-ce, gitlab-ee and gitlab-runner).

- Upstream: packages.gitlab.com
- Mirror URL: <https://mirror-gitlab.pkg.shecan.ir/>
- Clients: apt, dnf, yum
- Service status: <https://pkg.shecan.ir/status.json> (key `gitlab`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/gitlab/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/gitlab.json>

## Limitations

- apt and dnf still verify the official GitLab signatures.
- The install scripts (script.deb.sh, script.rpm.sh) are not served; configure the repository with the commands of this guide.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### apt: persistent (user- or system-wide configuration)

Run, GitLab Runner on Ubuntu or Debian (linux)

```sh
sudo install -d /etc/apt/keyrings
sudo curl -fsSLo /etc/apt/keyrings/gitlab.asc https://mirror-gitlab.pkg.shecan.ir/gpgkey/gpg.key
. /etc/os-release
echo "deb [signed-by=/etc/apt/keyrings/gitlab.asc] https://mirror-gitlab.pkg.shecan.ir/runner/gitlab-runner/$ID $VERSION_CODENAME main" | sudo tee /etc/apt/sources.list.d/gitlab-runner.list
sudo apt update && sudo apt install -y gitlab-runner
```

Undo / restore the default, GitLab Runner on Ubuntu or Debian (linux)

```sh
sudo rm -f /etc/apt/sources.list.d/gitlab-runner.list
sudo apt update
```

Run, GitLab CE on Ubuntu or Debian (linux)

```sh
sudo install -d /etc/apt/keyrings
sudo curl -fsSLo /etc/apt/keyrings/gitlab.asc https://mirror-gitlab.pkg.shecan.ir/gpgkey/gpg.key
. /etc/os-release
echo "deb [signed-by=/etc/apt/keyrings/gitlab.asc] https://mirror-gitlab.pkg.shecan.ir/gitlab/gitlab-ce/$ID/$VERSION_CODENAME $VERSION_CODENAME main" | sudo tee /etc/apt/sources.list.d/gitlab-ce.list
sudo apt update
```

Undo / restore the default, GitLab CE on Ubuntu or Debian (linux)

```sh
sudo rm -f /etc/apt/sources.list.d/gitlab-ce.list
sudo apt update
```

Run, GitLab CE on Ubuntu or Debian (linux) (checked by hand)

```sh
sudo EXTERNAL_URL="https://gitlab.example.com" apt install -y gitlab-ce
```

### dnf, yum: persistent (user- or system-wide configuration)

Configuration file, GitLab CE on EL 9 (linux): `/etc/yum.repos.d/gitlab_gitlab-ce.repo`

```ini
[gitlab_gitlab-ce]
name=gitlab_gitlab-ce
baseurl=https://mirror-gitlab.pkg.shecan.ir/gitlab/gitlab-ce/el/9/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://mirror-gitlab.pkg.shecan.ir/gpgkey/gpg.key
       https://mirror-gitlab.pkg.shecan.ir/gpgkey/gitlab/3D645A26AB9FBD22.pub.gpg
       https://mirror-gitlab.pkg.shecan.ir/gpgkey/gitlab/CB947AD886C8E8FD.pub.gpg
metadata_expire=300
```

Undo / restore the default, GitLab CE on EL 9 (linux)

```sh
sudo rm -f /etc/yum.repos.d/gitlab_gitlab-ce.repo
sudo dnf clean all
```

Configuration file, GitLab Runner on EL 9 (linux): `/etc/yum.repos.d/runner_gitlab-runner.repo`

```ini
[runner_gitlab-runner]
name=runner_gitlab-runner
baseurl=https://mirror-gitlab.pkg.shecan.ir/runner/gitlab-runner/el/9/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://mirror-gitlab.pkg.shecan.ir/gpgkey/gpg.key
       https://mirror-gitlab.pkg.shecan.ir/gpgkey/runner/49F16C5CC3A0F81F.pub.gpg
       https://mirror-gitlab.pkg.shecan.ir/gpgkey/runner/4C80FB51394521E9.pub.gpg
metadata_expire=300
```

Undo / restore the default, GitLab Runner on EL 9 (linux)

```sh
sudo rm -f /etc/yum.repos.d/runner_gitlab-runner.repo
sudo dnf clean all
```
