我对Gitlab Pipelines比较陌生,想为我的Python项目设置一个Pipeline。我使用了docker GitLab-runner容器,并配备了以下配置文件:
version: '3'
services:
runner:
container_name: runner
image: gitlab/gitlab-runner:latest
restart: unless-stopped
environment:
- TZ=Europe/Berlin
volumes:
- ./data:/etc/gitlab-runner/
- /var/run/docker.sock:/var/run/docker.sock
每当执行管道时,我都会收到以下错误消息:
Running with GitLab-runner 14.10.1 (f761588f)
on docker xxxxxxx
Preparing the "docker" executor
Using Docker executor with image python:latest ...
Pulling docker image python:latest ...
Using docker image sha256:8dec8e39f2eca1ee1f1b668619023da929039a39983de4433d42d25a7b79267c for python:latest with digest python@sha256:567018293e51a89db96ce4c9679fdefc89b3d17a9fe9e94c0091b04ac5bb4e89 ...
Preparing environment
Running on runner-xxxxxxxxx-project-38-concurrent-0 via xxxxxxxx...
Getting source from Git repository
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/group/project/.git/
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'http://mygitlab.de/group/projekt.git/'
Cleaning up a project directory and file-based variables
ERROR: Job failed: exit code 1
Gitlab Runner被分配给一个项目。我已经尝试重置一切并使用我的IP地址、DNS地址、本地IP、本地设备名称,但仍然没有起作用。
我阅读了其他人在2016年或更早期遇到相同的问题。我是否漏掉了什么?是否有设置需要正确设置?
编辑: 感谢@Vadim纠正我的标签。
经过更多的测试,我尝试在公共存储库中进行相同的操作。令我惊讶的是,它起作用了。问题在于授权。我仍然需要尽可能多地添加到我的配置中,测试它是否影响公共存储库,然后尝试使用私人存储库。 如果听说其他人遇到同样的问题,我会保持更新。