Clone
4
6.5 Gitlab
jsc-wiki edited this page 2026-10-14 06:27:29 +00:00
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Gitlab

第6章 開發與持續整合 · 來源:JSC 知識庫

簡介

GitLab CE(社群版)是功能完整的自架 Git 平台,內建 CI/CD、Issue 追蹤等功能。本文記錄在 Ubuntu 上透過官方套件庫安裝 GitLab 的步驟。

步驟

1. 安裝相依套件

安裝套件庫腳本與套件下載過程需要 curl。

apt update && apt install -y curl

透過官方腳本加入 GitLab 套件庫。

curl "https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh" | bash

2. 安裝 Gitlab

安裝時以 EXTERNAL_URL 指定對外網址,GitLab 會據此自動完成初始設定。

EXTERNAL_URL="https://gitlab.jsc.idv.tw" apt install gitlab-ce

3. 取得 root 密碼

安裝後系統會產生隨機的 root 初始密碼,存放於下列檔案,且必須在 24 小時內登入並變更,逾期該檔案會被自動刪除。

cat /etc/gitlab/initial_root_password

← 6.4 GiteaRunner(Alpine) · 本章目錄 · 全書目錄 · 6.6 ASP.NET →