第一步:
添加GitLab的官方存儲庫: curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash
第二步:
安裝最新版本的GitLab Runner: apt-get install gitlab-runner
就已經安裝好了
就可以開始注冊runner了
命令是: gitlab-runner register
輸入之后第一步會出現: Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
這里面輸入是你的gitlab項目中CI/CD中里面的值 可以自己查看

對應的是第2的URL
第二步就出現Please enter the gitlab-ci token for this runner: 讓你填寫token 及圖片中的第3
之后的官網中都有說明: https://docs.gitlab.com/runner/register/index.html
輸入完之后出現: Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
就代表注冊成功了
注冊之后在你項目中CI/CD中就會出現

就代表成功了
