在Debian中使用GitLab管理項目,可按以下步驟進行:
sudo apt update && sudo apt upgrade -y
。sudo apt install -y curl openssh-server ca-certificates tzdata perl
。curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
。sudo apt install gitlab-ce
。sudo gitlab-ctl reconfigure
。sudo gitlab-ctl start
。sudo ufw allow 80/tcp && sudo ufw allow 443/tcp && sudo ufw reload
。在瀏覽器中輸入服務器IP地址或域名,使用管理員賬號密碼登錄,可在設置頁面配置域名、郵箱等。
git clone <repository-url>
。git add .
和git commit -m "Commit message"
添加并提交文件。git push origin master
。.gitlab-ci.yml
文件,定義流程后提交代碼即可觸發。