我使用子模块创建了一个新项目,并希望运行gitlab-ci.yml。但是每次跑步者告诉我他无权访问或找不到该项目时。运行程序是Windows 10系统上的共享运行程序(必需)。它适用于较旧的项目,但不适用于新项目。
你有什么想法我做错了吗?
我已经做了什么:
CI脚本:
stages:
- build
variables:
ARTIFACTS_OUTPUT_PATH: "./builds"
GIT_SUBMODULE_STRATEGY: recursive
test_123:
stage: build
only:
- tags
- triggers
- schedules
- web
script:
- some commands
artifacts:
paths:
- ./builds/*
tags:
- windows
错误:
<!-- language: lang-sh -->
Cloning into 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt'...
Submodule 'hfdg' (git@gitlab.XXXXXXXX:user/hfdg.git) registered for path 'hfdg'
Cloning into 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt/hfdg'...
remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@gitlab.XXXXXXXX:user/hfdg.git' into submodule path 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt/hfdg' failed
Failed to clone 'hfdg'. Retry scheduled
Cloning into 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt/hfdg'...
remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@gitlab.XXXXXXXX:user/hfdg.git' into submodule path 'C:/gitlab-runner/builds/765197b3/0/user/ttttttt/hfdg' failed
Failed to clone 'hfdg' a second time, aborting
问题在于gitlab-runner没有分配给subrepo。因此,Runner尚未访问subrepo。