目的是为了使用gitLab CI/CD持续集成gitbook
下面是我的 .gitlab-ci.yml和流水线的日志
gitbook:
stage: build
script:
- pwd
- gitbook init
- gitbook build
流水线日志:
Running with gitlab-runner 15.8.1 (f86890c6)
on dib-runner c90608f0, system ID: s_b192fb01d86c
Preparing the “shell” executor
Using Shell executor…
Preparing environment
Running on lxy-virtual-machine…
Getting source from Git repository
Fetching changes…
Reinitialized existing Git repository in /home/gitlab-runner/builds/c90608f0/0/data-cloud/dib-wiki/.git/
remote: HTTP Basic: Access denied
fatal: Authentication failed for ‘登录 · GitLab’
Cleaning up project directory and file based variables
ERROR: Job failed: exit status 1
从提示上看,是runner在clone仓库的时候报错了,不知道您的GitLab是使用什么方式安装的?
gitlab是公司运维部署的,安装方式不清楚,但是在文件夹下执行git clone或者将 .gitlab-ci.yml设置为 variables:
GIT_STRATEGY: none,是可以执行git指令的,我怀疑是gitlab-runner的认证方式和我服务器上的git认证方式不一样,请问gitlab-runner的git认证方式需要另外配置公钥私钥那些内容吗