【发布时间】:2020-02-10 05:16:48
【问题描述】:
我创建了一个带有子模块的新项目,并想运行一个 gitlab-ci.yml。 但是每次跑步者告诉我他无权访问或找不到该项目。 运行器是 Windows 10 系统上的共享运行器(必需)。它适用于旧项目,但不适用于新项目。
你知道我做错了什么吗?
我已经做了什么:
- 在另一个跑步者身上测试
- 对跑步者使用 fetch 和 clone
- 在运行器 VM 上手动运行 git clone --recursive git@gitlab....
- 在我当前的电脑上递归地克隆 repo 并且成功了!
- first answer
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
【问题讨论】: