1.cicd 一直报fatal: could not read Username for
解决办法:
1。设置git 记录用户名密码
git config --global credential.helper store
之后再git clone 就记录了用户名密码了
2.gitlabrunner 的配置 文件 用户应该不是root
vi /etc/systemd/system/gitlab-runner.service
ExecStart=/usr/lib/gitlab-runner/gitlab-runner "run" "--working-directory" "/home/gitlab-runner" "--config" "/etc/gitlab-runner/config.toml" "--service" "gitlab-runner" "--syslog" "--user" "gitlab-runner"
改为:
ExecStart=/usr/lib/gitlab-runner/gitlab-runner "run" "--working-directory" "/data/gitlab-runner" "--config" "/etc/gitlab-runner/config.toml" "--service" "gitlab-runner" "--syslog" "--user" "root"
重新注册runner
gitlab-runner register
启动runner服务
systemctl daemon-reload
systemctl start gitlab-runner
重启的话用上面的命令
查看 list